🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #1080

Re: some compile errors fo gdb-7.0.1

#1080
From: Harald Koenig
Date: Tue, 23 Feb 2010 17:13
175 lines
6995 bytes
Hi,

here is a problem report for break points on AIX 5.1 and 5.3.

first AIX 5.3:

if a program first runs in gdb without any break points and finished,
then it's not possible to set break a break point for the next run
(this is the same on AIX 5.1 too):


	# gdb a.out 
	GNU gdb (GDB) 7.1.50.20100222-cvs
	Reading symbols from a.out...done.
	(gdb) r 
	Starting program: a.out 
	hello
	
	Program exited normally.
	(gdb) b main
==>	Cannot access memory at address 0xf00d7530
	(gdb) q

with bogus address "0xf00d7530"


if there is a(ny) break point set for the 1st run things seem to work fine:

	# gdb a.out 
	GNU gdb (GDB) 7.1.50.20100222-cvs
	Reading symbols from a.out...done.
	(gdb) b main
	Breakpoint 1 at 0x100003c8: file hello.c, line 23.
	(gdb) r
	Starting program: a.out 
	
	Breakpoint 1, main (argc=1, argv=0x2ff22578, env=0x2ff22580) at hello.c:23
	23      main(int argc...
	(gdb) c
	Continuing.
	hello
	
	Program exited normally.
	(gdb) r
	Starting program: a.out 
	
	Breakpoint 1, main (argc...=1, argv=0x2ff22578, env=0x2ff22580) at hello.c:23
	23      main(int argc, ...
	(gdb) c
	Continuing.
	hello
	
	Program exited normally.
	(gdb) b main
	Note: breakpoint 1 also set at pc 0x100003c8.
	Breakpoint 2 at 0x100003c8: file hello.c, line 23.
	(gdb) r
	Starting program: a.out 
	
	Breakpoint 1, main (argc=1, argv=0x2ff22578, env=0x2ff22580) at hello.c:23
	23      main(int argc, ...
	(gdb) c
	Continuing.
	hello
	
	Program exited normally.
	(gdb) 



===============================================================================

on AIX 5.1 though setting a break point before the first run
only seems to work, but that break point is not functional for the 1st run:

	Reading symbols from a.out...done.
	(gdb) b main
	Breakpoint 1 at 0x100003c8: file hello.c, line 23.
	(gdb) i b
	Num     Type           Disp Enb Address    What
	1       breakpoint     keep y   0x100003c8 in main at hello.c:23
	(gdb) r
	Starting program: a.out 
==>	Error in re-setting breakpoint 1: Cannot access memory at address 0x0
==>	Error in re-setting breakpoint 1: Cannot access memory at address 0x0
	hello
	
	Program exited normally.
	(gdb) i b
	Num     Type           Disp Enb Address    What
	1       breakpoint     keep y   0x100003c8 in main at hello.c:23

and that break point doesn't function either in a 2nd run:

	(gdb) r
	Starting program: a.out 
	hello
	
	Program exited normally.


but if I add another bp to main (or another function) gdb starts to work "better";)

	(gdb) i b   
	Num     Type           Disp Enb Address    What
	1       breakpoint     keep n   0x100003c8 in main at hello.c:23
	(gdb) b main
	Note: breakpoint 1 (disabled) also set at pc 0x100003c8.
	Breakpoint 2 at 0x100003c8: file hello.c, line 23.
	(gdb) r
	Starting program: a.out 
	
	Breakpoint 2, main (argc=1, argv=0x2ff2248c, env=0x2ff22494) at hello.c:23
	23      main(int argc,...
	(gdb) i b
	Num     Type           Disp Enb Address    What
	1       breakpoint     keep n   0x100003c8 in main at hello.c:23
	2       breakpoint     keep y   0x100003c8 in main at hello.c:23
	        breakpoint already hit 1 time
	(gdb) c
	Continuing.
	hello
	
	Program exited normally.
	(gdb) r
	Starting program: a.out 
	
	Breakpoint 2, main (argc=1, argv=0x2ff2248c, env=0x2ff22494) at hello.c:23
	23      main(int argc,...
	(gdb) c
	Continuing.
	hello
	
	Program exited normally.
	(gdb) 


any thoughts about that breakpoint weirdnes son AIX ?!?



right now I'm trying to build gdb on AIX 6.1 which right now fails here

      "gdb-CVS-20100222/gdb/aix-thread.c", line 352.46: 1506-280 (W) Function argument assignment between types "int*" and "unsigned int*" is not allowed.

where the source reads like this -- hmmmmm....

  /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file.  */
  extern int getthrds (pid_t, struct thrdsinfo64 *,
                       int, pthdb_tid_t *, int);



but now I have to leave for today -- stay tuned ;-))

Harald Koenig
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig                                          \/\/\/\/\/\/\/\/\/
science+computing ag                                    //  /     \\  \
koenig@science-computing.de                            ^^^^^       ^^^^^
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 
Technical Details
Message-ID: <mailman.1716.1266945243.14305.bug-gdb@gnu.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.glorb.com!news.isc.org!usenet.stanford.edu!news.stanford.edu!not-for-mail
References: <20100215141621.GA9469@atuin.science-computing.de> <201002181923.34196.pedro@codesourcery.com> <20100223163505.GA21619@atuin.science-computing.de>

Show Full Headers
Complete Article Headers
X-Google-Thread: f0ead4270c,bc75c21c9a9e46ff,start
X-Google-Attributes: gidf0ead4270c,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!news.glorb.com!news.isc.org!usenet.stanford.edu!news.stanford.edu!not-for-mail
From: Harald Koenig <H.Koenig@science-computing.de>
Newsgroups: gnu.gdb.bug
Subject: Re: some compile errors fo gdb-7.0.1
Date: Tue, 23 Feb 2010 18:13:48 +0100
Lines: 179
Approved: bug-gdb@gnu.org
Message-ID: <mailman.1716.1266945243.14305.bug-gdb@gnu.org>
References: <20100215141621.GA9469@atuin.science-computing.de>
 <201002181923.34196.pedro@codesourcery.com>
 <20100223163505.GA21619@atuin.science-computing.de>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.stanford.edu 1266945244 25862 199.232.76.165 (23 Feb 2010 17:14:04 GMT)
X-Complaints-To: news@news.stanford.edu
Cc: Harald Koenig <koenig@science-computing.de>, gdb-patches@sourceware.org,
 Pedro Alves <pedro@codesourcery.com>, bug-gdb@gnu.org
To: Harald Koenig <H.Koenig@science-computing.de>
Envelope-to: bug-gdb@gnu.org
X-Virus-Scanned: amavisd-new
Content-Disposition: inline
In-Reply-To: <20100223163505.GA21619@atuin.science-computing.de>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-detected-operating-system: by eggs.gnu.org: Solaris 8 (1)
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=subscribe>