This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
breakpoints/2119: gdb 6.4 prints errors when restarting program with pending breakpoints
- From: gnu at greglaw dot net
- To: gdb-gnats at sources dot redhat dot com
- Cc: jules at op59 dot net
- Date: 22 Apr 2006 16:34:21 -0000
- Subject: breakpoints/2119: gdb 6.4 prints errors when restarting program with pending breakpoints
- Reply-to: gnu at greglaw dot net
>Number: 2119
>Category: breakpoints
>Synopsis: gdb 6.4 prints errors when restarting program with pending breakpoints
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 22 16:38:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: gnu@greglaw.net
>Release: 6.4
>Organization:
>Environment:
Linux, many kernels/distros (all that I've tried)
>Description:
When restarting a program that has breakpoints pending on library loads that have been resolved, I get error messages telling me that the breakpoint 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);
I've had a look on 6.3, and it seems here the function code agrees with the comment:
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);
}
>How-To-Repeat:
Launch gdb with a program that loads a shared library. Set a breakpoint (so that it's pending), and start the program. Once the breakpoint has been resolved, restart the program with the run command.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: