Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* decode_variable's use of not_found_ptr
@ 2006-04-22 13:00 Greg Law
  2006-04-22 16:32 ` Dave Korn
  2006-04-23 15:57 ` Daniel Jacobowitz
  0 siblings, 2 replies; 8+ messages in thread
From: Greg Law @ 2006-04-22 13:00 UTC (permalink / raw)
  To: gdb

Hi all,

I tried to send this to gdb-prs, but to no avail - hopefully mmore luck 
here.

Anyway, sometimes when I restart a program. I get error messages telling 
me that a breakpoint in a shared library can't be found:

     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.
     Error in re-setting breakpoint 2:
     Function "foo" not defined.

I've had a quick look at the source, and the message seems to be coming 
from decode_variable()

The comment for this function says:

/* Decode a linespec that's a variable.  If FILE_SYMTAB is non-NULL,
    look in that symtab's static variables first.  If NOT_FOUND_PTR is
    not NULL and the function cannot be found, store boolean true in the
    location pointed to and do not issue an error message.  */


but at the bottom of the function it says:


  if (not_found_ptr)
    *not_found_ptr = 1;
  throw_error (NOT_FOUND_ERROR, _("Function \"%s\" not defined."), copy);


Now, I must confess gdb's internal exception mechanism is deeply 
mysterious to me, but that code looks to me like it doesn't do what the 
comment claims.  i.e. if not_found_ptr is non-NULL, it still issues the 
error message.

What's wrong - my reading of the code, or the code?

Cheers,

Greg


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-23 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-22 13:00 decode_variable's use of not_found_ptr Greg Law
2006-04-22 16:32 ` Dave Korn
2006-04-22 21:21   ` Dave Korn
2006-04-22 21:36   ` Greg Law
2006-04-23 10:22     ` Nick Roberts
2006-04-23 15:57 ` Daniel Jacobowitz
2006-04-24  6:05   ` Greg Law
2006-04-24  6:13     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox