From: glburt@comcast.net
To: linux-assembly@vger.kernel.org
Subject: gdb help
Date: Sat, 21 Feb 2004 17:36:33 +0000 [thread overview]
Message-ID: <022120041736.4481.4a77@comcast.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
I am getting different results when I use gdb at home and at school. It is
the same version of gdb at both places, however the version of nasm
is different:
school is 0.98.19
home is 0.98.38
I don't know what that would make a difference, though.
I have searched for a config file, but don't know what file to look for,
saw nothing interesting based on file name.
I want to have the program step through one instruction at a time and
display the next line of code to be executed.
I save the two versions and included them in the attachment.
Any help would be greatly appreciated.
Thanks.
Gary
[-- Attachment #2: gdb_results --]
[-- Type: application/octet-stream, Size: 2107 bytes --]
Linux server at UMBC
test1[102]: cat Makefile
test1a : test1a.o
gcc -o test1a test1a.o
test1a.o : test1a.asm
nasm -l test1a.lst -g -f elf test1a.asm
clean :
rm test1a test1a.o test1a.lst test1a.asm~
test1[103]: make
nasm -l test1a.lst -g -f elf test1a.asm
gcc -o test1a test1a.o
test1[104]: gdb test1a
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-gnu"...
(gdb) break *main
Breakpoint 1 at 0x8048420
(gdb) run
Starting program: /tmp_mnt/ftp/pub/WWW/courses/undergraduate/CMSC313/spring04/burt_katz/test1/test1a
Breakpoint 1, 0x08048420 in main ()
(gdb) s
Single stepping until exit from function main,
which has no line number information.
Program exited normally.
==================================================================
Linux at home
[~/courses/umbc/CMSC313/spring04/test1]$ make
nasm -l test1a.lst -g -f elf test1a.asm
gcc -o test1a test1a.o
[~/courses/umbc/CMSC313/spring04/test1]$ gdb test1a
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-gnu"...
(gdb) break *main
Breakpoint 1 at 0x8048300: file test1a.asm, line 40.
(gdb) run
Starting program: /home/burt/courses/umbc/CMSC313/spring04/test1/test1a
Breakpoint 1, main () at test1a.asm:40
40 mov eax, [ A ] ; eax ____________________________
(gdb) s
42 add eax, 32 ; eax ____________________________
(gdb)
next reply other threads:[~2004-02-21 17:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-21 17:36 glburt [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-24 1:18 gdb help Emmet Ford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=022120041736.4481.4a77@comcast.net \
--to=glburt@comcast.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).