From: Andrew Cagney <ac131313@redhat.com>
To: Adam Fedor <fedor@doc.com>
Cc: GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] Step over Objective-C dispatch function
Date: Tue, 25 Mar 2003 16:25:00 -0000 [thread overview]
Message-ID: <3E8082EE.2010207@redhat.com> (raw)
In-Reply-To: <3E807C37.1040804@doc.com>
Minor tweaks:
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.99
> diff -u -p -r1.99 infrun.c
> --- infrun.c 20 Mar 2003 22:52:53 -0000 1.99
> +++ infrun.c 25 Mar 2003 04:12:09 -0000
> @@ -43,6 +43,7 @@
> #include "regcache.h"
> #include "value.h"
> #include "observer.h"
> +#include "language.h"
>
> /* Prototypes for local functions */
>
> @@ -2386,7 +2387,9 @@ process_event_stop_test:
> function. That's what tells us (a) whether we want to step
> into it at all, and (b) what prologue we want to run to
> the end of, if we do step into it. */
> - real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
> + real_stop_pc = skip_language_trampoline(stop_pc);
GNU puts a space between the function and its arguments vis:
skip_language_trampoline (stop_pc)
check the other code for this.
> + if (real_stop_pc == 0)
> + real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
> if (real_stop_pc != 0)
> ecs->stop_func_start = real_stop_pc;
>
> +/* Iterate through all registered languages looking for and calling
> + any non-NULL struct language_defn.skip_trampoline() functions.
> + Return the result from the first that returns non-zero, or 0 if all
> + `fail'. */
> +CORE_ADDR
> +skip_language_trampoline (CORE_ADDR pc)
> +{
> + int i;
> + CORE_ADDR real_pc = 0;
> +
> + for (i = 0; i < languages_size; i++)
> + {
> + if (languages[i]->skip_trampoline)
> + {
> + real_pc = (languages[i]->skip_trampoline)(pc);
> + if (real_pc)
> + break;
> + }
> + }
> +
> + return real_pc;
Return 0. Otherwize, the old SKIP_TRAMPOLINE_CODE() won't kick in.
> + /* PC is possibly an unknown languages trampoline.
> + If that PC falls in a trampoline belonging to this language,
> + return the address of the first pc in the real function, or 0
> + if it isn't a language tramp for this language. */
> + CORE_ADDR (*skip_trampoline) (CORE_ADDR pc);
> +
yep.
Otherwize approved.
Andrew
next prev parent reply other threads:[~2003-03-25 16:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 3:35 Adam Fedor
2003-01-31 2:52 ` Michael Snyder
2003-01-31 3:07 ` Andrew Cagney
2003-01-31 3:54 ` Adam Fedor
2003-03-20 21:08 ` Andrew Cagney
2003-03-25 15:56 ` Adam Fedor
2003-03-25 16:25 ` Andrew Cagney [this message]
2003-03-25 16:41 ` Andrew Cagney
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=3E8082EE.2010207@redhat.com \
--to=ac131313@redhat.com \
--cc=fedor@doc.com \
--cc=gdb-patches@sources.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