Hi there,
Tell me how did you compile the program. Did you use the regular debug option (-g) while compiling with gcc/g++. The debugger may not be able to set a break point if it could not find any debugging information.
Rgds,
Jas
Mailto: [EMAIL PROTECTED]
| [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED] 08/13/2006 09:53 PM
|
|
Send Gdb mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.gnu.org/mailman/listinfo/gdb
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gdb digest..."
Today's Topics:
1. "Cannot set breakpoint -2" error message (Clark L. Coleman)
----------------------------------------------------------------------
Message: 1
Date: Fri, 4 Aug 2006 09:53:55 -0400 (EDT)
From: "Clark L. Coleman" <[EMAIL PROTECTED]>
Subject: [Gdb] "Cannot set breakpoint -2" error message
To: [email protected]
Cc: "Clark L. Coleman" <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
There is a somewhat common problem with gdb installations that has no
solution that I could find. Specifically, any attempt to run an
executable (even the simplest hello world executable) under gdb
produces the error message:
Cannot set breakpoint -2
This occurs with no attempt to set a breakpoint or do anything in gdb
except the "run" command.
If you put the following into Google:
gdb "cannot set breakpoint -2"
you will get a huge list of hits. All of these are message board
inquiries for particular Linux variants or particular application
packages. The only thing they have in common is that the user getting
the error message was using gdb on a Unix OS of some sort. The replies
to their queries contain various speculations that relate to the
particular environment being used, but none are helpful. Most queries
have no replies at all.
In my case, I am running Gentoo Linux, kernel 2.6.13-4, on a MIPS
R12000 CPU, with executables compiled as "gcc -g" using gcc 3.4.6, and
the problem happens with gdb 6.4, gdb 6.3, gdb 6.1.1, gdb 6.1, and
gdb 6.0. None of the Google hits had anything to do with MIPS
processors or Gentoo Linux, so I would not worry about that.
It seems that this problem occurs often enough that the gdb community
needs to post an FAQ with the solution, if anyone knows one.
Thanks for any help.
Clark Coleman
University of Virginia
Computer Science Department
------------------------------
_______________________________________________
Gdb mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gdb
End of Gdb Digest, Vol 35, Issue 2
**********************************
ForwardSourceID:NT00002D5E
=====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
_______________________________________________ Gdb mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gdb
