* debugging in linux
@ 2002-09-14 14:31 Hernan
2002-09-14 22:51 ` lx
0 siblings, 1 reply; 4+ messages in thread
From: Hernan @ 2002-09-14 14:31 UTC (permalink / raw)
To: linux-assembly
Hello,
I'm trying to debug a program (without debug information) with gdb but I
can't do some things:
1) How can I run step by step,
2) see the registers values (including eip),
3) make a dump of memory
I'm running code that starts in 0x80003c0 and when I try disas 0x80003c0 I
get "No function contains specified address".
The executable is a test that I'm doing I change the elf entry point and
put some code there.
Is there a softice like debugger for linux? where can I get it?
Thanks in advance!
Hernan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: debugging in linux
2002-09-14 14:31 debugging in linux Hernan
@ 2002-09-14 22:51 ` lx
2002-09-15 2:57 ` linking with ld Mateusz Srebrny
0 siblings, 1 reply; 4+ messages in thread
From: lx @ 2002-09-14 22:51 UTC (permalink / raw)
To: Hernan; +Cc: linux-assembly
On Sat, 14 Sep 2002 11:31:05 -0300
Hernan <beri@ciudad.com.ar> wrote:
> Hello,
>
> I'm trying to debug a program (without debug information) with gdb but I
> can't do some things:
>
> 1) How can I run step by step,
> 2) see the registers values (including eip),
> 3) make a dump of memory
>
> I'm running code that starts in 0x80003c0 and when I try disas 0x80003c0 I
> get "No function contains specified address".
try 'objdump -d'
> The executable is a test that I'm doing I change the elf entry point and
> put some code there.
>
> Is there a softice like debugger for linux? where can I get it?
no. linux. 'ald' might serve your purpose...
url re http://linuxassembl.org
hp
--
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
software patents http://petition.eurolinux.org/pr/pr17.html
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread* linking with ld
2002-09-14 22:51 ` lx
@ 2002-09-15 2:57 ` Mateusz Srebrny
2002-09-15 13:34 ` Maciej Hrebien
0 siblings, 1 reply; 4+ messages in thread
From: Mateusz Srebrny @ 2002-09-15 2:57 UTC (permalink / raw)
To: linux-assembly
Hi,
I have question about ld.
Precisely:
I have an ELF object (produced by nasm) defining global procedure named
start.
I want to link it with object made by 'gcc -c' on file loking like this:
#include <stdio.h>
extern void start(void);
int main() {
start();
return 0;
}
I tried 'ld main.o start.o -o main -lc'...
it complained sth about not defining _start label, and then refused to
execute main file (which was produced despite ld warnings)...
I wanted to do it with ld, 'couse I thought that linker is to link
things...
Of course linking it with gcc works, but again I thought that compiler
is to compile things to objects...
and the info for ld doesn't offer help in the matter... (at least I
don't see it there)
I would be grateful for your help...
Mateusz Srebrny
PS the question "why do I want to link a nasm object with a C one?" is
very difficult to answer... i just have to do it...
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: linking with ld
2002-09-15 2:57 ` linking with ld Mateusz Srebrny
@ 2002-09-15 13:34 ` Maciej Hrebien
0 siblings, 0 replies; 4+ messages in thread
From: Maciej Hrebien @ 2002-09-15 13:34 UTC (permalink / raw)
To: linux-assembly
Mateusz Srebrny wrote:
>
> Hi,
>
> I have question about ld.
> Precisely:
> I have an ELF object (produced by nasm) defining global procedure named
> start.
> I want to link it with object made by 'gcc -c' on file loking like this:
>
> #include <stdio.h>
>
> extern void start(void);
>
> int main() {
> start();
> return 0;
> }
>
> I tried 'ld main.o start.o -o main -lc'...
You can link it using gcc, not ld directly like this: gcc -o mail
main.o start.o. It should work just fine.
> it complained sth about not defining _start label, and then refused to
> execute main file (which was produced despite ld warnings)...
_start is the default entry point. If You won't create any global label
named _start in Your code then the ld doesn't know what to put in ELF
header as a starting point. You may set it explicitly using ld's -e
option which i think is the good solution if You can't link with gcc
like in above example.
> I wanted to do it with ld, 'couse I thought that linker is to link
> things...
> Of course linking it with gcc works, but again I thought that compiler
> is to compile things to objects...
gcc works with ld. gcc sends its results to ld.
> and the info for ld doesn't offer help in the matter... (at least I
> don't see it there)
>
> I would be grateful for your help...
> Mateusz Srebrny
>
> PS the question "why do I want to link a nasm object with a C one?" is
> very difficult to answer... i just have to do it...
--
Maciej Hrebien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-15 13:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-14 14:31 debugging in linux Hernan
2002-09-14 22:51 ` lx
2002-09-15 2:57 ` linking with ld Mateusz Srebrny
2002-09-15 13:34 ` Maciej Hrebien
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).