Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Greg Law <greglaw@greglaw.net>
To: gdb@sourceware.org
Subject: decode_variable's use of not_found_ptr
Date: Sat, 22 Apr 2006 13:00:00 -0000	[thread overview]
Message-ID: <4449E3F8.3020408@greglaw.net> (raw)

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


             reply	other threads:[~2006-04-22  8:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-22 13:00 Greg Law [this message]
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

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=4449E3F8.3020408@greglaw.net \
    --to=greglaw@greglaw.net \
    --cc=gdb@sourceware.org \
    /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