🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #1175

Failed to stop at given points in arm gdb

#1175
From: prasadam kumar
Date: Fri, 30 Nov 2007 06:59
132 lines
6868 bytes
------=_Part_2787_11842155.1196405953894
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I have cross compiled the gdb-6.3 with arm-none-linux-gnueabi-gcc and cross
compiler has gcc version 4.1.1.

While cross compiling the gdb-6.3,  i have faced the tui problem, to
overcome this i have disabled tui (--disable-tui), after this it has
compiled successfully.

I have done the below steps to cross compile the sample.c :

# arm-none-linux-gnueabi-gcc -g sample.c -o sample
# file sample
sample: ELF-32 bit LSB executable, ARM,version1 (SYSV), for GNU/Linux 2.6.14,
dynamically linked (uses shared libs), not stripped

I have copied the cross compiled gdb.exe, sample.c, sample.exe(arm
executable ), libncurses.so.5 and libthread_db.so.1 on to arm target.

Then i have done the below steps to debug the sanple.exe:

# ./gdb sample
GNU gdb 6.3
Copyright 2004 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 the 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 "arm-linux"...Using host libthread_db library
"/libthread_db.so.1".

(gdb) list

1 #include<stdio.h>
2 main()
3 {
4 int i;
5 i=10;
6 fprintf(stdout," \n print:%i", i);
7 i=20;
 8 fprintf(stdout," \n print:%i", i);
9 return 0;
10 }
(gdb) break main
Breakpoint 1 at 0x8388:file sample.c, line 5.
(gdb) break 7
 Breakpoint 2 at 0x83a8:file sample.c, line 7.
(gdb) run
Starting program:/sample

Program exited normally

Please help to solve the below problems:

1.I am not able to run any arm exe with arm-gdb.
2.arm-gdb (cross compiled gdb) is not able to stop at the given break
points.


Thanks in Advance,
Prashant.

------=_Part_2787_11842155.1196405953894
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>Hi,</div>
<div>&nbsp;</div>
<div>I have cross compiled the gdb-6.3 with arm-none-linux-gnueabi-gcc and cross compiler&nbsp;has&nbsp;gcc version 4.1.1.</div>
<div>&nbsp;</div>
<div>While cross compiling the gdb-6.3,&nbsp; i have faced the tui problem, to overcome this i have disabled tui (--disable-tui), after this it has compiled successfully.</div>
<div>&nbsp;</div>
<div>I have done the below steps to cross compile the sample.c :</div>
<div>&nbsp;</div>
<div># arm-none-linux-gnueabi-gcc -g sample.c -o sample</div>
<div># file sample</div>
<div>sample: ELF-32 bit LSB executable, ARM,version1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped</div>
<div>&nbsp;</div>
<div>I have copied the cross compiled gdb.exe, sample.c, sample.exe(arm executable ), libncurses.so.5 and libthread_db.so.1 on to arm target.</div>
<div>&nbsp;</div>
<div>Then i have done the below steps to debug the sanple.exe:</div>
<div>&nbsp;</div>
<div># ./gdb sample</div>
<div>GNU gdb 6.3</div>
<div>Copyright 2004 Free Software Foundation Inc.</div>
<div>GDB is free software, covered by the GNU General Public License, and you are </div>
<div>welcome to change it and/or distribute the copies of it under certain conditions.</div>
<div>Type &quot;show copying&quot; to see the conditions.</div>
<div>There is absolutely no warranty for GDB.Type &quot;Show warranty&quot; for details.</div>
<div>This GDB was configured as &quot;arm-linux&quot;...Using host libthread_db library &quot;/libthread_db.so.1&quot;.</div>
<div>&nbsp;</div>
<div>(gdb) list</div>
<div>&nbsp;</div>
<div>1 #include&lt;stdio.h&gt;</div>
<div>2 main()</div>
<div>3 {</div>
<div>4&nbsp;int i;</div>
<div>5&nbsp;i=10;</div>
<div>6 fprintf(stdout,&quot; \n print:%i&quot;, i);</div>
<div>7 i=20;&nbsp;</div>
<div>
<div>8&nbsp;fprintf(stdout,&quot; \n print:%i&quot;, i);</div>
<div>9 return 0;</div>
<div>10&nbsp;}</div>
<div>(gdb) break main</div>
<div>Breakpoint 1 at 0x8388:file sample.c, line 5.</div>
<div>(gdb) break 7</div>
<div>
<div>Breakpoint&nbsp;2 at 0x83a8:file sample.c, line 7.</div>
<div>(gdb) run</div>
<div>Starting program:/sample</div>
<div>&nbsp;</div>
<div>Program exited normally</div>
<div>&nbsp;</div>
<div>Please help to solve the below problems:</div>
<div>&nbsp;</div>
<div>1.I am not able to run any arm exe with arm-gdb.</div>
<div>2.arm-gdb (cross compiled gdb) is not able to stop at the given break points.</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Thanks in Advance,</div>
<div>Prashant.</div></div></div>

------=_Part_2787_11842155.1196405953894--
Technical Details
Message-ID: <mailman.4333.1196405961.18990.bug-gdb@gnu.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f5053,9f1c8c4bd291dd96,start
X-Google-Attributes: gidf5053,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
From: "prasadam kumar" <prasadamkumar@gmail.com>
Newsgroups: gnu.gdb.bug
Subject: Failed to stop at given points in arm gdb
Date: Thu, 29 Nov 2007 22:59:13 -0800
Lines: 134
Approved: bug-gdb@gnu.org
Message-ID: <mailman.4333.1196405961.18990.bug-gdb@gnu.org>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
 boundary="----=_Part_2787_11842155.1196405953894"
X-Trace: news.Stanford.EDU 1196405964 15790 199.232.76.165 (30 Nov 2007 06:59:24 GMT)
X-Complaints-To: news@news.stanford.edu
To: bug-gdb@gnu.org
Envelope-to: bug-gdb@gnu.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
 h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type;
 bh=Kb7NqzC7kNtNCYnIEzFO5utI+9rJuTv8wsRgMGkx7xM=;
 b=YAmnh21XXZJ/uPlOspXX8fvZbzlNnyGKxZ89df/Qb5IndPmfsxw/s3HtFI+2etDYwPK7OsGok4nHUaqVeG+VXhyRJ3smaFPoDp5IKIjBs92+BIVlOD3cjbcWF7E7aBFNDvoX4Hiu/8lW0rK+xE7AgOYjbIdUnKVScFbAZ5JDQ3s=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
 h=received:message-id:date:from:to:subject:mime-version:content-type;
 b=xVZhgsdPmAGdLuQINDRVDvLoqx1gE2kU88evp6hTX33mo2xJwCO0ZSeXlwtS5gAn2QRJPJlHL5NRrw9H4e8E2so0GHLHBhhPMSuEKZpVkyK+W60w5kZAEEqvgNw5ItpGsGlMRxZimhlVww4chBSAlYMc8Qp5//fOsWMqGlpSpZU=
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
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>