From: Hui Zhu <hui_zhu@mentor.com>
To: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix error when gdb connect to a stub that tracepoint is running[1/2] reset current_trace_status in the begin of remote_start_remote
Date: Wed, 08 Feb 2012 08:39:00 -0000 [thread overview]
Message-ID: <4F3234C6.7020104@mentor.com> (raw)
In-Reply-To: <4F274C42.7010008@mentor.com>
Ping.
Thanks,
Hui
On 01/31/12 10:04, Hui Zhu wrote:
> Hi,
>
> For the re-insert breakpoint, the stack dump is:
> #0 remote_download_tracepoint (loc=0x35040b0) at
> ../../src/gdb/remote.c:9982
> #1 0x00000000006727c1 in download_tracepoint_locations () at
> ../../src/gdb/breakpoint.c:10670
> #2 0x0000000000673111 in update_global_location_list (should_insert=1)
> at ../../src/gdb/breakpoint.c:11021
> #3 0x0000000000663752 in create_overlay_event_breakpoint () at
> ../../src/gdb/breakpoint.c:2322
> #4 0x0000000000675c9f in breakpoint_re_set () at
> ../../src/gdb/breakpoint.c:12621
> #5 0x00000000007efe65 in solib_add (pattern=0x0, from_tty=1,
> target=0x1d1e860, readsyms=1)
> at ../../src/gdb/solib.c:928
> #6 0x000000000057b452 in enable_break (info=0x3307890, from_tty=1) at
> ../../src/gdb/solib-svr4.c:1624
> #7 0x000000000057c428 in svr4_solib_create_inferior_hook (from_tty=1) at
> ../../src/gdb/solib-svr4.c:2234
> #8 0x00000000007f04a9 in solib_create_inferior_hook (from_tty=1) at
> ../../src/gdb/solib.c:1172
> #9 0x00000000006cc8e5 in post_create_inferior (target=0x1d1e860,
> from_tty=1) at ../../src/gdb/infcmd.c:431
> #10 0x00000000006d479d in start_remote (from_tty=1) at
> ../../src/gdb/infrun.c:2309
> #11 0x00000000005d80c9 in remote_start_remote (from_tty=1,
> target=0x1cefce0, extended_p=0)
> at ../../src/gdb/remote.c:3367
>
> About this patch, what I do is:
> 1. If we try to connect an new stub, reset current_trace_status to unknown.
> 2. Change remote_can_download_tracepoint to if the current_trace_status
> is unknown, return false.
> After this patch, the tracepoint insered after:
> /* Possibly the target has been engaged in a trace run started
> previously; find out where things are at. */
> if (remote_get_trace_status (current_trace_status ()) != -1)
> {
> I think that will make us handle tracepoint issue more easy.
>
> 2012-01-31 Hui Zhu <hui_zhu@mentor.com>
>
> * remote.c (remote_start_remote): Set running_known of
> current_trace_status to 0 in the begin of this function.
> (remote_can_download_tracepoint): If running_known of
> current_trace_status is 0, return false.
>
> Thanks,
> Hui
prev parent reply other threads:[~2012-02-08 8:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 2:05 Hui Zhu
2012-01-31 11:26 ` Yao Qi
2012-01-31 13:06 ` Hui Zhu
2012-01-31 16:49 ` Yao Qi
2012-02-08 18:31 ` Pedro Alves
2012-02-10 7:50 ` Hui Zhu
2012-02-10 7:54 ` Hui Zhu
2012-02-17 1:26 ` Hui Zhu
2012-02-17 1:21 ` Hui Zhu
2012-02-08 8:39 ` Hui Zhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F3234C6.7020104@mentor.com \
--to=hui_zhu@mentor.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox