2008-08-18 08:09:28     DDDfor debugg

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-08-18 08:09:28     DDDfor debugg

suresh kumar (INDIA)

Message: 60575   

 

HI

 

I am using the DDD for the debugging the application program.i can able to c program.but i dont know to how to for assembly program.i cab set the breakpoint but i con't run the program.

QuoteReplyEditDelete

 

 

2008-08-18 14:02:46     Re: DDDfor debugg

Robin Getz (UNITED STATES)

Message: 60582   

 

Suresh:

 

Have a look at the ddd manual.

 

http://www.gnu.org/manual/ddd/html_mono/ddd.html

 

specifically, this section:

 

http://www.gnu.org/manual/ddd/html_mono/ddd.html#Machine-Level%20Debugging

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-19 22:36:39     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60697   

on ddd:

    I can't find *.S on uClinux08r1.

    Can't open *.S file.

    Can't set break on *.S.

  

    *.c file can debug.

 

    why?

 

 

TranslateQuoteReplyEditDelete

 

 

2008-08-19 22:50:13     Re: DDDfor debugg

Mike Frysinger (UNITED STATES)

Message: 60699   

 

DDD is simply gdb.  so what exactly are you trying to do and what exactly is not working ?

QuoteReplyEditDelete

 

 

2008-08-20 02:06:27     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60710   

 

我想用DDD调试应用程序,应用程序里面的C文件,是可以正常调试,设断点,单步都是可以的,但.S的汇编文件却不可以设断点,在DDD中也看不不到代码,请问是为什么???

TranslateQuoteReplyEditDelete

 

 

2008-08-20 02:23:53     Re: DDDfor debugg

Mike Frysinger (UNITED STATES)

Message: 60712   

 

provide some actual examples of what you're doing instead of saying "it doesnt work"

 

if you compile assembly files correctly as documented (for example, using the right flags like -g), we know debugging of assembly files works just fine

QuoteReplyEditDelete

 

 

2008-08-20 03:35:01     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60720   

 

See Annex !

 

but bfin_264dec.S is exist.

 

why?

 

debug.jpg

TranslateQuoteReplyEditDelete

 

 

2008-08-20 03:44:44     Re: DDDfor debugg

Mike Frysinger (UNITED STATES)

Message: 60724   

 

you havent shown that the file in question was (1) built with the proper flags and (2) even linked into your executable

 

verify both of these things first

QuoteReplyEditDelete

 

 

2008-08-20 04:47:42     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60742   

 

(1) built with the proper flags and

 

(2) even linked into your executable

 

 

 

生成的应用程序是可执行的,并且正常,就是用DDD调试时进不去(找不到)汇编文件,其他的C文件、H文件都是可以进去的。

TranslateQuoteReplyEditDelete

 

 

2008-08-20 11:02:56     Re: DDDfor debugg

Robin Getz (UNITED STATES)

Message: 60764   

 

Jingwei:

 

I just tried things and they worked for me.

 

As Mike asked for - can you described exactly what you are trying to do, with the specific bfin-xxx-gcc/as commands?

 

Thanks

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-20 22:46:31     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60783   

 

fdpic

 

my executable file is main,command are as follows:

 

host>ddd -debugger bfin-linux-uclibc main

 

on target:

 

bfin>gdbserver localhost:1234 main

 

(gdb) target remote target IP:1234

 

//Link to normal

 

(gdb)break main.c:50

 

//normal

 

(gdb) break bfin.S:50

 

// can't find bfin.S file,but bfin.S file is exist.

This is the crux of the problem, .S file can not find. C file normal.

TranslateQuoteReplyEditDelete

 

 

2008-08-21 09:24:51     Re: DDDfor debugg

Robin Getz (UNITED STATES)

Message: 60834   

 

Jingwei:

 

You still never told me the information I asked for - what is the command line you are using to compile the applications? (turn the source into an object & link all the objects together).

 

-Robin

QuoteReplyEditDelete

 

 

2008-08-22 12:52:54     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 60921   

 

two files is:main.c and bfin.S

 

Makefile as follows:

 

CROSS = bfin-linux-uclibc-

CC = $(CROSS)gcc

 

LDFLAGS += -W1

 

CFLAGS  += -O2 -Wall -g

 

EXEC = main

OBJS = main.o bfin.o

 

all: $(EXEC)

 

$(EXEC): $(OBJS)

$(CC) $(LDFLAGS) -o $@ $(OBJS)

 

romfs:

$(ROMFSINST) /bin/$(EXEC)

 

clean:

-rm -f $(EXEC) *.elf *.gdb *.o

 

 

 

main can be correctly implemented on the target.

TranslateQuoteReplyEditDelete

 

 

2008-08-25 21:35:50     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 61046   

 

???

TranslateQuoteReplyEditDelete

 

 

2008-08-25 23:04:36     Re: DDDfor debugg

Yi Li (CHINA)

Message: 61048   

 

How is your "bfin_264dec.S " compiled? Please post the output when your run "make".

QuoteReplyEditDelete

 

 

2008-08-26 05:14:13     Re: DDDfor debugg

Jingwei Cheng (CHINA)

Message: 61085   

 

is bfin.S

 

[root@localhost share_windows]# make

bfin-linux-uclibc-gcc -O2 -Wall -g -c -o main.o main.c

bfin-linux-uclibc-gcc   -c -o bfin.o bfin.S

main.o bfin.o -O2 -Wall -g -W1 -o main

[root@localhost share_windows]#

TranslateQuoteReplyEditDelete

 

 

2008-08-26 05:31:57     Re: DDDfor debugg

Yi Li (CHINA)

Message: 61088   

 

Try using "bfin-linux-uclibc-gcc   -c -g -o bfin.o bfin.S"

 

"main.o bfin.o -O2 -Wall -g -W1 -o main" - it is not valid.

Attachments

Outcomes