From: Matt Rice <ratmice@gmail.com>
To: Vladimir Prus <ghost@cs.msu.su>
Cc: gdb@sources.redhat.com
Subject: Re: Symbols/blocks questions
Date: Sat, 19 Sep 2009 14:34:00 -0000 [thread overview]
Message-ID: <8ba6bed40909190734l3b5701e1ub90941c385a590b6@mail.gmail.com> (raw)
In-Reply-To: <200909191552.02677.ghost@cs.msu.su>
On Sat, Sep 19, 2009 at 4:52 AM, Vladimir Prus <ghost@cs.msu.su> wrote:
>
> I am trying to port some MI improvement from the Apple GDB,
> and got some questions about symbol/block handling. I'd
> appreciate if somebody comment on it.
>
> 1. Given 'struct block *b', is it true that
>
> block_for_pc (b.startaddr) == b
>
> ?
>
> 2. Uness I am mistaken, in case of lines inside templates,
> inline functions, and constructors, decode_line_1 returns
> just one sal. (And breakpoint.c explicitly expands thsoe in
> expand_line_sal). In what cases will decode_line_1 actually
> return multiple sals? For overloaded functions? Anything else?
> Would it be sensible, eventually, to make decode_line_1
> return all locations corresponding to file:line?
decode_all_digits: single (break {,+,-}[0-9]+)
decode_objc: multiple via decode_line_2
decode_indirect: single (break *functionptr)
decode_dollar: single (the first break $convenience or break $function found)
decode_compound: multiple via decode_line_2
decode_variable: single, this one i'm less clear on
if passed a symbol which is not a function, it throws an error
'whatever' not found. through symbols which are functions e.g.
break main fall through, and those do not pass an error but return a
single value.
some of these could potentially return a single when ambiguity exist
based on whatever they decide.
e.g. a function
void $foobar() { }
void uhh() {}
set $foobar = &uhh
or something crazy like that that will never happen and could easily
be avoided by the user.
and decode_indirect i would assume uses whatever is in the scope
objc categories are technically not overloaded functions but I think
this is just semantics on the choice of the term overloaded function.
I wouldn't take this as gospel or anything, i could have easily
overlooked something, for instance i have no idea how
Ada hooks into this.
next prev parent reply other threads:[~2009-09-19 14:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-19 11:52 Vladimir Prus
2009-09-19 14:34 ` Matt Rice [this message]
2009-09-19 16:34 ` Joel Brobecker
2009-09-19 16:41 ` Vladimir Prus
2009-09-19 17:02 ` Joel Brobecker
2009-09-19 18:35 ` Vladimir Prus
2009-09-20 15:52 ` Joel Brobecker
2009-09-20 20:30 ` Daniel Jacobowitz
2009-09-22 9:47 ` Jerome Guitton
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=8ba6bed40909190734l3b5701e1ub90941c385a590b6@mail.gmail.com \
--to=ratmice@gmail.com \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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