diff options
author | Joel Brobecker <brobecker@adacore.com> | 2014-06-04 14:03:22 -0400 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2014-06-04 17:57:21 -0400 |
commit | ef7cab6ba16d76c3470fb27a0c8966513f7cb34a (patch) | |
tree | 1bf3f3b22260284949cd72fe19af41a0dd271994 /gdb/gdbserver/mem-break.c | |
parent | 012370f6818657a816df1463ee71ca4e4ee40b33 (diff) | |
download | gdb-ef7cab6ba16d76c3470fb27a0c8966513f7cb34a.zip gdb-ef7cab6ba16d76c3470fb27a0c8966513f7cb34a.tar.gz gdb-ef7cab6ba16d76c3470fb27a0c8966513f7cb34a.tar.bz2 |
gdbserver crash if the_target->supports_z_point_type is NULL
When debugging on LynxOS targets (and probably on SPU targets as well),
inserting a breakpoint and resuming the program's execution causes
GDBserver to crash.
The crash occurs while handling the Z0 packet sent by GDB to insert
our breakpoint, because z_type_supported calls
the_target->supports_z_point_type without checking that it is not NULL
This patch fixes the issue by making z_type_supported return false if
the_target->supports_z_point_type is NULL.
gdb/gdbserver/ChangeLog:
PR server/17023
* mem-break.c (z_type_supported): Return zero if
THE_TARGET->SUPPORTS_Z_POINT_TYPE is NULL.
Tested on ppx-lynx5.
Diffstat (limited to 'gdb/gdbserver/mem-break.c')
-rw-r--r-- | gdb/gdbserver/mem-break.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index 71876f7..2ce3ab2 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -897,6 +897,7 @@ static int z_type_supported (char z_type) { return (z_type >= '0' && z_type <= '4' + && the_target->supports_z_point_type != NULL && the_target->supports_z_point_type (z_type)); } |