Ray Hurst | 9 Feb 2008 20:21
Picon

I don't understand why this doesn't work

I'm running under Windows XP and Cygwin.

I ran GDB on a simple C program and captured the output (below).
I have a few questions:

Why can I run the program several times with no errors but as soon as I 
set a breakpoint at main it gets a SIGSEGV fault?

Why does the backtrace show only addresses?

C:\Documents and Settings\Ray 
Hurst\workspace\CDT\HelloWorld-ANSIC\Debug>gdb Hel
loWorld-ANSIC.exe
GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) list
5        Version     :
6        Copyright   : Your copyright notice
7        Description : Hello World in C, Ansi-style
8 
=======================================================================
=====
9        */
10
(Continue reading)

jhh | 11 Feb 2008 21:50

SIGSEGV with b main

gdb-request <at> gnu.org wrote:
> (gdb) b main
> Breakpoint 1 at 0x401050: file 
> Program received signal SIGSEGV, Segmentation fault.
>
>   
  Sometimes gdb behaves better for me if I am more specific.  Try 
putting the break at line 15, in the body of your program, ie, b 
main:15.  This way all the stack adjustments are assured of being finished.

Hezi Sasson | 12 Feb 2008 09:08
Picon

RE: SIGSEGV with b main

please remove me from the publishing list

מאת: gdb-bounces+hezi=netwise.co.il <at> gnu.org בשם jhh
נשלח: ב 2/11/2008 10:50 PM
אל: gdb <at> gnu.org
נושא: SIGSEGV with b main

gdb-request <at> gnu.org wrote:
> (gdb) b main
> Breakpoint 1 at 0x401050: file
> Program received signal SIGSEGV, Segmentation fault.
>
>  
  Sometimes gdb behaves better for me if I am more specific.  Try
putting the break at line 15, in the body of your program, ie, b
main:15.  This way all the stack adjustments are assured of being finished.








************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************







************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************


Ignacio Castaño | 12 Feb 2008 09:11
Picon

problems unsubscribing

I'm sorry to contact this group for this reason, but I've been unable to
unsubscribe myself from the gdb.gnu.org mailing list.

I've sent messages to <gdb-unsubscribe <at> sourceware.org> and to
<gdb-unsubscribe-castano=gmail.com <at> sourceware.org> with the same
outcome. I got a confirmation message, that I replied to, but I
received a failure message indicating that castano <at> gmail.com is not a
member of the gdb.gnu.org mailing list.

> Acknowledgment: The address
>
>    castano <at> gmail.com
>
> was not on the gdb mailing list when I received
> your request and is not a subscriber of this list.

Apparently I am, because I keep getting messages from it!

> If you unsubscribe, but continue to receive mail, you're subscribed
> under a different address than you currently use. Please look at the
> header for:
>
> 'Return-Path: <gdb-return-1234-user=host.dom <at> sourceware.org>'

The return path attribute is:

Return-Path: <gdb-bounces+castano=gmail.com <at> gnu.org>

> The unsubscribe address for this user would be:
> 'gdb-unsubscribe-user=host.dom <at> sourceware.org'.
> Just mail to that address, substituting user=host.dom for the real
> values, reply to the confirmation request, and you should receive a message
> that you're off the list.

That's just what I did!

> If this still doesn't work, I'm sorry to say that I can't help you.
> Please FORWARD a list message together with a note about what you're
> trying to achieve and a list of addresses that you might be subscribed
> under to my owner:
>
>     gdb-owner <at> sourceware.org
>
> who will take care of it. My owner is a little bit slower than I am,
> so please be patient.

I also tried sending a message to <gdb-owner <at> sourceware.org>, but I
got an automated error message instead. It seems that gdb-owner is not
a real person:

> Hi. This is the qmail-send program at sourceware.org.
> I'm afraid I wasn't able to deliver your message to the following addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> <postmaster <at> sourceware.org>:
>
> ezmlm-reject: fatal: Sorry, I don't accept commands in the subject
> line. Please send a message to the -help address shown in the the
> ``Mailing-List:'' header for command info (#5.7.0)

Could somebody please remove me from this mailing list?

Thanks!

--

-- 
Ignacio Castaño
castano <at> gmail.com

Matthew Woehlke | 12 Feb 2008 15:54
Picon
Gravatar

Re: SIGSEGV with b main

Hezi Sasson wrote:
> please remove me from the publishing list

How to unsubscribe from a mailing list, for dummies.

1. Do not e-mail the list asking to be unsubscribed. Unless the list
owner is feeling nice, this usually does not work. Plus it is bad
netiquette, annoys people, and shows your ignorance for all the world to
see (and in a place that is usually archived).

1a. For pity's sake, DON'T do the above by replying to some random 
message, and especially don't CC the poster of said random message.

2. Visit the list maintenance URL for instructions (some also provide
the interface to unsubscribe you).

2a. If you don't know said URL, go to http://<domain>, where <domain> is
the domain of the list address (e.g. kde.org), or some logical
permutation thereof and look for 'lists' or 'mailing lists'.

3. Use those instructions to unsubscribe yourself.

4. If that fails, contact the list owner directly stating that you are
having problems with the automated list maintenance functions. Telling
him/her *exactly* what you did, and how it doesn't seem to be working is
a Really Good Idea. Otherwise he/she will tell you to go do steps 2-3.

5. If 2-4 fail, then AND ONLY THEN should you post to the list directly.
As in step 4, explaining exactly what you've tried is a Really Good
Idea. Otherwise you look like an idiot and get responses like this one. 
  :-)

6. See http://permalink.gmane.org/gmane.comp.gdb.general/609 for an 
excellent example of step 5.

(Ignacio: If you're still getting this, I apologize that I can't help 
you, but *THANK YOU* for that excellent example of "the right way". It 
was wonderfully refreshing, especially coming right after the message 
that earned this reply.)

--

-- 
Matthew
"Adriaan has bin AWOL"
"s/bin/been/g... I spend way too much time with computers."
   -- Stefan Teleman (on IRC)


Gmane