From: Nick Roberts <nickrob@snap.net.nz>
To: Greg Law <greg@greglaw.net>
Cc: gdb@sourceware.org
Subject: Re: decode_variable's use of not_found_ptr
Date: Sun, 23 Apr 2006 10:22:00 -0000 [thread overview]
Message-ID: <17482.40548.6370.963304@farnswood.snap.net.nz> (raw)
In-Reply-To: <444A5AD3.5020201@greglaw.net>
> >> 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?
I think this part is right and the clue is in the macro NOT_FOUND_ERROR.
> Had a quick look at 6.3's code, and that is indeed different:
>
> if (not_found_ptr)
> {
> *not_found_ptr = 1;
> /* The caller has indicated that it wishes quiet notification of any
> error where the function or file is not found. A call to
> error_silent causes an error to occur, but it does not issue
> the supplied message. The message can be manually output by
> the caller, if desired. This is used, for example, when
> attempting to set breakpoints for functions in shared libraries
> that have not yet been loaded. */
> error_silent ("Function \"%s\" not defined.", copy);
> }
>
> For some reason the error_silent seems to have got chopped in version
> 6.4. I'll submit a problem report.
Looking at the Changelog error_silent has been deleted and replaced with
throw_error. I think the problem is elsewhere, in break_command_1
in breakpoint.c maybe:
case NOT_FOUND_ERROR:
/* If called to resolve pending breakpoint, just return
error code. */
if (pending_bp)
return e.reason;
exception_print (gdb_stderr, e);
I guess that pending_bp is NULL in your case and you need to debug GDB to see
why.
It would probably also help (those more knowledgable than me) if you said how
your GDB has been configured.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2006-04-22 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-22 13:00 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 [this message]
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=17482.40548.6370.963304@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=gdb@sourceware.org \
--cc=greg@greglaw.net \
/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