This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Include putpkt in TRY_CATCH. PR gdb/15275
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Gareth McMullin <gareth at blacksphere dot co dot nz>, gdb-patches at sourceware dot org
- Date: Fri, 29 Mar 2013 15:02:45 +0100
- Subject: Re: Include putpkt in TRY_CATCH. PR gdb/15275
- References: <CAL8qUbrD=fgMP7nE0O8tX=AXifUpQXas25o_4SfK4p79rfoUpw at mail dot gmail dot com> <CAL8qUbqjtBKJFJZ6dPS78Zh8Eb3b33U9JXTmn1pS3Le93xt7Rw at mail dot gmail dot com> <20130325195832 dot GA15218 at host2 dot jankratochvil dot net> <515478BE dot 3030801 at redhat dot com>
On Thu, 28 Mar 2013 18:07:10 +0100, Pedro Alves wrote:
> And detaching should
> delete breakpoints from the target before sending "D" (although detach
> command does, a detach caused by "quit" doesn't (if you "gdbserver --attach",
I see it working:
#0 remote_remove_breakpoint at remote.c:8113
#1 in target_remove_breakpoint at target.c:2462
#2 in bkpt_remove_location at breakpoint.c:12983
#3 in remove_breakpoint_1 at breakpoint.c:3590
#4 in remove_breakpoint at breakpoint.c:3696
#5 in remove_breakpoints_pid at breakpoint.c:2955
#6 in target_detach at target.c:2595
#7 in kill_or_detach at top.c:1212
#8 in iterate_over_inferiors at inferior.c:395
#9 in quit_target at top.c:1293
#10 in catch_errors at exceptions.c:546
#11 in quit_force at top.c:1331
#12 in quit_command at ./cli/cli-cmds.c:327
> "quit" will offer to detach instead of kill), and that's a bug...)),
It will but I do not see where is a bug:
(gdb) q
A debugging session is active.
Inferior 1 [process 11571] will be detached.
Quit anyway? (y or n) y
> gdb/
> 2013-03-28 Pedro Alves <palves@redhat.com>
>
> PR gdb/15275
>
> * remote.c (send_interrupt_sequence): Use remote_serial_write.
> (remote_serial_write): New function.
> (putpkt_binary, getpkt_or_notif_sane_1): Use remote_serial_write.
I agree this fix is better. I will revert the previous check-in after this
check-in.
Thanks,
Jan