Bug 65814 - gdb misses breakpoint when compiled with gcc 3.1
gdb misses breakpoint when compiled with gcc 3.1
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gdb (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-31 18:22 EDT by eeeg
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-06-03 21:49:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
code (476 bytes, text/plain)
2002-05-31 18:24 EDT, eeeg
no flags Details

  None (edit)
Description eeeg 2002-05-31 18:22:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Description of problem:
In the attached code gdb misses a breakpoint when compiled with gcc3.1.    When
compiled with gcc2.96 the breakpoint is not missed.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile attached file with gcc3.1 (e.g., g++ -g -o random random_int.cc)
2. gdb random
3. put a breakpoint in at line 18 and let it run
4. gdb misses breakpoint

	

Actual Results:  Here is what happens when compiled with gcc3.1

$ /usr/gnu/gcc-3.1/bin/g++ --version
g++ (GCC) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/gnu/gcc-3.1/bin/g++ -o random.gcc31 -g random_int.cc
$ gdb random.gcc31
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 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 "i386-redhat-linux"...
(gdb) b 18
Breakpoint 1 at 0x8048583: file random_int.cc, line 18.
(gdb) run
Starting program: /home/eeeg/econ/tmp/random.gcc31

Program exited normally.
(gdb) quit
$

When compiled with gcc2.96 we get

$ g++ --version
2.96
$ g++ -o random.gcc296 -g random_int.cc
$ gdb random.gcc296
GNU gdb Red Hat Linux (5.1.90CVS-5)
Copyright 2002 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 "i386-redhat-linux"...
(gdb) b 18
Breakpoint 1 at 0x8048576: file random_int.cc, line 18.
(gdb) run
Starting program: /home/eeeg/econ/tmp/random.gcc296

Breakpoint 1, random_int::random_int (this=0x8049848, idum=-2) at random_int.cc:19
19         idum--;
(gdb) quit
The program is running.  Exit anyway? (y or n) y
$


Expected Results:  stop at breakpoint when compiled with 3.1

Additional info:
Comment 1 eeeg 2002-05-31 18:24:03 EDT
Created attachment 59167 [details]
code
Comment 2 eeeg 2002-06-03 21:49:19 EDT
I thought my summary of the problem was poorly worded.  I should have written 
'gdb misses breakpoint on code compiled with gcc 3.1' 
 
Similarly, in the problem description, I should have written 'In the attached 
code gdb misses a breakpoint when the attached code is compiled with gcc3.1.    
When the attached code is compiled compiled with gcc2.96 the breakpoint is not 
missed.' 
 
Apologies
Comment 3 Trond Eivind Glomsrxd 2002-06-04 10:37:42 EDT
Use "-gstabs" if you want to use this compiler - gcc 3.1 has a new debug format.

Note You need to log in before you can comment on or make changes to this bug.