This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] pr1430

On Fri, Mar 21, 2008 at 7:16 AM, Daniel Jacobowitz <> wrote:
> On Fri, Mar 14, 2008 at 01:38:12PM -0700, Matt Rice wrote:
>  > here is an attempt at fixing pr1430
>  >
>  > canonicalizes to file.m:foo or file.m:-[AClass foo]
>  > which is how it knows that foo is a function and it shouldn't attempt
>  > to look up a method
>  > named foo. not sure if this should be done in decode_line_2 based on
>  > language setting?
>  >
>  > so if you move files around or anything you have to reset your
>  > breakpoints, but i would take that over an endless loop.
>  This isn't safe; there might not be a filename.  Aren't we getting
>  canonicalized to file.m:-[AClass foo] already?
>  build_canonical_line_spec should do it.

no, we're not getting a file.m:-[AClass foo] from  decode_line_2
where the canonical is being setup as only an -[AClass foo] not a

in decode_objc the function i'm patching, it only calls
build_canonical_line_spec if i1 == 1, and in this case i1 > 1

further build_canonical_line_spec is incapable of dealing with
symtabs_and_lines, it can be called with symtab_and_line * but it
can't be called multiple times to create canonical filespec from
symtabs_and_lines as it'll just set the first item in the canonical
each time called.

with the existing canonical it would also leak them, since its
expecting to be creating a new canonical, so we kinda want a new
function for this?

I don't know how to get no filename except the case described below...

>  A harder version of this problem will come up if you have a
>  non-debuggable symbol named foo.  We won't have a filename to put
>  in front of it.  So how do we know it's already been canonicalized?
>  This is sort of like what the Apple patch did in the audit trail.

I can't currently test this without first fixing pr1236 there is a
patch in 1261, decode_line_2 never shows any non-debuggable objc
methods in the picker list,

and therefore it isn't possible for there to be any non-debuggable
symbols and i'm always hesitant to guess...

so I suppose i need to attack this first... i will try what mentioned
in your subsequent email after i get that working.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]