git: 57a543d8b850 - main - gdb: only return signal values for powerpc's gdb_cpu_signal()

Mitchell Horne mhorne at FreeBSD.org
Fri Jan 22 19:08:13 UTC 2021


The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=57a543d8b85065f77e0b68162d09a03335970f90

commit 57a543d8b85065f77e0b68162d09a03335970f90
Author:     Mitchell Horne <mhorne at FreeBSD.org>
AuthorDate: 2021-01-22 18:56:56 +0000
Commit:     Mitchell Horne <mhorne at FreeBSD.org>
CommitDate: 2021-01-22 19:01:49 +0000

    gdb: only return signal values for powerpc's gdb_cpu_signal()
    
    Summary:
    The values returned by this function are reported to the gdb client as
    the reason for the break in execution, a signal value such as SIGTRAP,
    SIGEMT, or SIGSEGV. As such, exact vector numbers can be misidentified.
    Return SIGEMT in the default case instead.
    
    Reviewed by:    alfredo
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D28046
---
 sys/powerpc/powerpc/gdb_machdep.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/powerpc/powerpc/gdb_machdep.c b/sys/powerpc/powerpc/gdb_machdep.c
index 83b3245f4e69..a7f1de512e31 100644
--- a/sys/powerpc/powerpc/gdb_machdep.c
+++ b/sys/powerpc/powerpc/gdb_machdep.c
@@ -98,10 +98,7 @@ gdb_cpu_signal(int vector, int dummy __unused)
 		return (SIGTRAP);
 #endif
 
-	if (vector <= 255)
-		return (vector);
-	else
-		return (SIGEMT);
+	return (SIGEMT);
 }
 
 void


More information about the dev-commits-src-all mailing list