aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc64-linux-nat.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2017-11-21 14:04:38 -0800
committerJoel Brobecker <brobecker@adacore.com>2017-11-21 14:33:31 -0800
commit54aa6c67f5a0d52dabd428cc40ce02781032acd3 (patch)
treefa0f6c61e4276b7449e29712e448d7714b9c729b /gdb/sparc64-linux-nat.c
parentcf3fbed4a00e668ffcad1b878eccec87334fdcff (diff)
downloadgdb-54aa6c67f5a0d52dabd428cc40ce02781032acd3.zip
gdb-54aa6c67f5a0d52dabd428cc40ce02781032acd3.tar.gz
gdb-54aa6c67f5a0d52dabd428cc40ce02781032acd3.tar.bz2
(Ada) crash connecting to TSIM simulator
Connecting to a TSIM simulator over the remote protocol causes GDB to crash with the following failed assertion: (gdb) tar remote :1234 Remote debugging using :1234 /[...]/gdb/ravenscar-thread.c:182: internal-error: ravenscar_update_inferior_ptid: Assertion `!is_ravenscar_task (inferior_ptid)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y What happens is the following. Upon connection to the target, GDB sends a 'qfThreadInfo' query, which is the query asking the target for the ID of the first thread, and TSIM replies 'm0': Sending packet: $qfThreadInfo#bb...Ack Packet received: m0 As a result of this, GDB takes the '0' as the TID, and because of it, constructs a ptid whose value is {42000, 0, 0}. This trips our !is_ravenscar_task check, because all it does to identify threads corresponding to ravenscar tasks is that their lwp is null, because that's how we construct their ptid. But this is unfortunatly not sufficient when debugging with TSIM, because the thread ID that TSIM returns causes the creation of a ptid whose lwp is zero, which matches the current identification scheme and yet is clearly not a ravenscar task. The fix is to also make sure that the ptid's tid field is nonzero. gdb/ChangeLog: * ravenscar-thread.c (is_ravenscar_task): Also verify that the ptid's TID is nonzero.
Diffstat (limited to 'gdb/sparc64-linux-nat.c')
0 files changed, 0 insertions, 0 deletions