From: Pedro Alves <palves@redhat.com>
To: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Report stop locations in inlined functions.
Date: Fri, 27 Oct 2017 12:37:00 -0000 [thread overview]
Message-ID: <092c3398-9989-44b5-ecd9-3026f0b6c4cf@redhat.com> (raw)
In-Reply-To: <db907503-fb8e-3b0f-8b67-d1139299ae4a@redhat.com>
On 10/20/2017 08:21 PM, Keith Seitz wrote:
>
> *1 The "simpler" solution (for illustration only)
>
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 32ceea7..4d2ebd8 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -68,6 +68,7 @@
> #include "format.h"
> #include "thread-fsm.h"
> #include "tid-parse.h"
> +#include "inline-frame.h"
>
> /* readline include files */
> #include "readline/readline.h"
> @@ -5359,6 +5360,7 @@ bpstat_check_breakpoint_conditions (bpstat bs, ptid_t ptid)
> }
> CATCH (ex, RETURN_MASK_ALL)
> {
> + clear_inline_frame_state (ptid);
> exception_fprintf (gdb_stderr, ex,
> "Error in testing breakpoint condition:\n");
> }
> diff --git a/gdb/infrun.c b/gdb/infrun.c
> index d00c5f6..60fd166 100644
> --- a/gdb/infrun.c
> +++ b/gdb/infrun.c
> @@ -5864,6 +5864,12 @@ handle_signal_stop (struct execution_control_state *ecs)
> stop_print_frame = 1;
> stopped_by_random_signal = 0;
>
> + /* See if there is a breakpoint/watchpoint/catchpoint/etc. that
> + handles this event. */
> + ecs->event_thread->control.stop_bpstat
> + = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
> + stop_pc, ecs->ptid, &ecs->ws);
> +
> /* Hide inlined functions starting here, unless we just performed stepi or
> nexti. After stepi and nexti, always show the innermost frame (not any
> inline function call sites). */
> @@ -5894,7 +5900,12 @@ handle_signal_stop (struct execution_control_state *ecs)
> ecs->event_thread->prev_pc,
> &ecs->ws)))
> {
> - skip_inline_frames (ecs->ptid);
> + struct breakpoint *bpt = NULL;
> +
> + if (ecs->event_thread->control.stop_bpstat != NULL)
> + bpt = ecs->event_thread->control.stop_bpstat->breakpoint_at;
> +
> + skip_inline_frames (ecs->ptid, bpt);
>
> /* Re-fetch current thread's frame in case that invalidated
> the frame cache. */
> @@ -5939,12 +5950,6 @@ handle_signal_stop (struct execution_control_state *ecs)
> }
> }
>
> - /* See if there is a breakpoint/watchpoint/catchpoint/etc. that
> - handles this event. */
> - ecs->event_thread->control.stop_bpstat
> - = bpstat_stop_status (get_regcache_aspace (get_current_regcache ()),
> - stop_pc, ecs->ptid, &ecs->ws);
> -
> /* Following in case break condition called a
> function. */
> stop_print_frame = 1;
>
>
>
> *2 The more "complex," safer solution (for illustration only)
Can you send me these as full patches, or send me the
patch they apply on top of too? I'll need to play with
it a bit to understand it all better.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-10-27 12:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 2:36 [PATCH 1/2] Report call site for " Keith Seitz
2017-07-11 2:36 ` [PATCH 2/2] Report stop locations in " Keith Seitz
2017-07-18 17:16 ` Pedro Alves
2017-07-18 17:46 ` Pedro Alves
2017-10-20 19:21 ` Keith Seitz
2017-10-27 12:37 ` Pedro Alves [this message]
2017-10-30 21:18 ` Keith Seitz
2017-12-01 19:50 ` Pedro Alves
2017-10-20 19:02 ` Keith Seitz
2017-07-11 14:25 ` [PATCH 1/2] Report call site for " Eli Zaretskii
2017-07-17 19:23 ` Jan Kratochvil
2017-07-18 19:05 ` Pedro Alves
2017-10-20 18:46 ` Keith Seitz
2017-10-27 12:49 ` Pedro Alves
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=092c3398-9989-44b5-ecd9-3026f0b6c4cf@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/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