public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug breakpoints/15956] New: gdbserver crash when doing tstart with no process
@ 2013-09-14 20:31 marc.khouzam at ericsson dot com
2015-02-03 21:55 ` [Bug breakpoints/15956] " antoine.tremblay at ericsson dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: marc.khouzam at ericsson dot com @ 2013-09-14 20:31 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15956
Bug ID: 15956
Summary: gdbserver crash when doing tstart with no process
Product: gdb
Version: HEAD
Status: NEW
Severity: minor
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: marc.khouzam at ericsson dot com
Using the extended-remote protocol, I did a 'tstart' but had forgotten to
attach to the process first: gdbserver crashed. I realize I did something
wrong, but a crash is not good :)
gdb session:
> gdb.7.7 testapp
GNU gdb (GDB) 7.6.50.20130910-cvs
[...]
Reading symbols from testapp...done.
(gdb) target extended-remote :9999
Remote debugging using :9999
(gdb) trace main
Tracepoint 1 at 0x400ec6: file testapp.cc, line 182.
(gdb) inf inf
Num Description Executable
* 1 <null> /home/lmckhou/testapp
(gdb) tstart
=> here gdbserver crashes
Backtrace of the gdbserver:
#0 0x000000000040672b in inferior_target_data (inferior=0x0) at
../../../gdb/gdbserver/inferiors.c:211
#1 0x000000000042e058 in linux_read_memory (memaddr=0, myaddr=0x7fffffffdf80
"\300\337\377\377\377\177", len=8)
at ../../../gdb/gdbserver/linux-low.c:4416
#2 0x00000000004136a5 in read_inferior_memory (memaddr=0,
myaddr=0x7fffffffdf80 "\300\337\377\377\377\177", len=8)
at ../../../gdb/gdbserver/target.c:46
#3 0x0000000000419665 in read_inferior_data_pointer (symaddr=0,
val=0x7fffffffdfc0) at ../../../gdb/gdbserver/tracepoint.c:444
#4 0x0000000000419aa2 in clear_inferior_trace_buffer () at
../../../gdb/gdbserver/tracepoint.c:1463
#5 0x000000000041b14c in cmd_qtinit (packet=0x6633d0 "QTinit") at
../../../gdb/gdbserver/tracepoint.c:2404
#6 0x000000000041ed29 in handle_tracepoint_general_set (packet=0x6633d0
"QTinit") at ../../../gdb/gdbserver/tracepoint.c:4142
#7 0x000000000040bcfd in handle_general_set (own_buf=0x6633d0 "QTinit") at
../../../gdb/gdbserver/server.c:612
#8 0x0000000000411c31 in process_serial_event () at
../../../gdb/gdbserver/server.c:3184
#9 0x0000000000412d09 in handle_serial_event (err=0, client_data=0x0) at
../../../gdb/gdbserver/server.c:3619
#10 0x0000000000418c8f in handle_file_event (event_file_desc=4) at
../../../gdb/gdbserver/event-loop.c:434
#11 0x000000000041841c in process_event () at
../../../gdb/gdbserver/event-loop.c:189
#12 0x0000000000419200 in start_event_loop () at
../../../gdb/gdbserver/event-loop.c:552
#13 0x00000000004115f1 in main (argc=3, argv=0x7fffffffe408) at
../../../gdb/gdbserver/server.c:2986
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug breakpoints/15956] gdbserver crash when doing tstart with no process 2013-09-14 20:31 [Bug breakpoints/15956] New: gdbserver crash when doing tstart with no process marc.khouzam at ericsson dot com @ 2015-02-03 21:55 ` antoine.tremblay at ericsson dot com 2015-02-10 18:56 ` cvs-commit at gcc dot gnu.org 2015-02-11 6:46 ` antoine.tremblay at ericsson dot com 2 siblings, 0 replies; 4+ messages in thread From: antoine.tremblay at ericsson dot com @ 2015-02-03 21:55 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=15956 Antoine Tremblay <antoine.tremblay at ericsson dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |antoine.tremblay at ericsson dot c | |om Assignee|unassigned at sourceware dot org |antoine.tremblay at ericsson dot c | |om -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug breakpoints/15956] gdbserver crash when doing tstart with no process 2013-09-14 20:31 [Bug breakpoints/15956] New: gdbserver crash when doing tstart with no process marc.khouzam at ericsson dot com 2015-02-03 21:55 ` [Bug breakpoints/15956] " antoine.tremblay at ericsson dot com @ 2015-02-10 18:56 ` cvs-commit at gcc dot gnu.org 2015-02-11 6:46 ` antoine.tremblay at ericsson dot com 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2015-02-10 18:56 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=15956 --- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Antoine Tremblay <hexa@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b05ec7a53f8a3b0cbcb2b42772ca0e70a319d2ab commit b05ec7a53f8a3b0cbcb2b42772ca0e70a319d2ab Author: Antoine Tremblay <antoine.tremblay@ericsson.com> Date: Mon Jan 26 13:08:53 2015 -0500 gdbserver: Fix crash when QTinit is handled with no inferior process attached When gdbserver is called with --multi and attach has not been called yet and tstart is called on the gdb client, gdbserver would crash. This patch fixes gdbserver so that it returns E01 to the gdb client. Also this patch adds a testcase to verify this bug named no-attach-trace.exp gdb/gdbserver/ChangeLog: PR breakpoints/15956 * tracepoint.c (cmd_qtinit): Add check for current_thread. gdb/testsuite/ChangeLog: * gdb.trace/no-attach-trace.c: New file. * gdb.trace/no-attach-trace.exp: New file. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug breakpoints/15956] gdbserver crash when doing tstart with no process 2013-09-14 20:31 [Bug breakpoints/15956] New: gdbserver crash when doing tstart with no process marc.khouzam at ericsson dot com 2015-02-03 21:55 ` [Bug breakpoints/15956] " antoine.tremblay at ericsson dot com 2015-02-10 18:56 ` cvs-commit at gcc dot gnu.org @ 2015-02-11 6:46 ` antoine.tremblay at ericsson dot com 2 siblings, 0 replies; 4+ messages in thread From: antoine.tremblay at ericsson dot com @ 2015-02-11 6:46 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=15956 Antoine Tremblay <antoine.tremblay at ericsson dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Antoine Tremblay <antoine.tremblay at ericsson dot com> --- Fixed by commit above. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-10 18:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-09-14 20:31 [Bug breakpoints/15956] New: gdbserver crash when doing tstart with no process marc.khouzam at ericsson dot com 2015-02-03 21:55 ` [Bug breakpoints/15956] " antoine.tremblay at ericsson dot com 2015-02-10 18:56 ` cvs-commit at gcc dot gnu.org 2015-02-11 6:46 ` antoine.tremblay at ericsson dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).