This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -data-disassemble segmetation fault


Hi,

I haven't added the PR yet because I plan on trying to fix the bug when
I get some time.

Should I add the PR first, and then fix the bug if I get time?

If you intend posting a patch (with addition to the existing disasm tests), no skip all that.


Andrew


Also, I didn't know if you realized that the file I sent in called 'basics.c' is not the same file as the one in the gdb
testsuite directory. This is probably why I found the crash, it does
look as if basics.c in the testsuite is tested well.


Thanks,
Bob Rossi

On Wed, Jul 30, 2003 at 10:45:33AM -0400, Andrew Cagney wrote:

>Hi,
>
>I tried using the -data-disassemble command on the attached file.
>I ran this command,
>-data-disassemble -f basic.c -l 25 -n -1 -- 1
>and gdb segfaulted.
>
>I am concerned that the MI code is being presented as an alternative >interface to GDB, but it is mainly untested when it comes to building >a practical application on top of it. Either that, or I just found the
>needle in the haystack crash, since it was the first or second command I
>ran.


Given that a quick glance at GDBs testsuite reveals that it is trying all the following combinations:


111-data-disassemble -s $pc -e "$pc + 12" -- 0
222-data-disassemble  -f basics.c -l 32 -- 0
002-data-disassemble -f basics.c -l 21 -- 1
003-data-disassemble -s $pc -e "$pc+4" -- 1
123-data-disassemble -f foo -l abc -n 0 -- 0
321-data-disassemble -s foo -e bar -- 0
456-data-disassemble -s $pc -f basics.c -- 0
789-data-disassemble -f basics.c -l 32 -- 9
222-data-disassemble  -f basics.c -l 32 -n 20 -- 0
222-data-disassemble  -f basics.c -l 32 -n 0 -- 0
222-data-disassemble  -f basics.c -l 32 -n 50 -- 0
222-data-disassemble  -f basics.c -l 32 -n 20 -- 1
222-data-disassemble  -f basics.c -l 32 -n 0 -- 1
222-data-disassemble  -f basics.c -l 32 -n 50 -- 1
111-data-disassemble -s $pc -e "$pc + 12" -- 0
222-data-disassemble  -f basics.c -l 32 -- 0
002-data-disassemble -f basics.c -l 21 -- 1
003-data-disassemble -s $pc -e "$pc+4" -- 1
123-data-disassemble -f foo -l abc -n 0 -- 0
321-data-disassemble -s foo -e bar -- 0
456-data-disassemble -s $pc -f basics.c -- 0
789-data-disassemble -f basics.c -l 32 -- 9
222-data-disassemble  -f basics.c -l 32 -n 20 -- 0
222-data-disassemble  -f basics.c -l 32 -n 0 -- 0
222-data-disassemble  -f basics.c -l 32 -n 50 -- 0
222-data-disassemble  -f basics.c -l 32 -n 20 -- 1
222-data-disassemble  -f basics.c -l 32 -n 0 -- 1
222-data-disassemble  -f basics.c -l 32 -n 50 -- 1

I'd assume that you've tickled an edge case.


>Please let me know if I am doing anything wrong.
>
>I have attached the file that reproduced the crash ( basic.c ), and I also
>attached a backtrace. I was running a gdb out of cvs, freshly updated
>tonight ( 07/29/2003 ).


Can you turn this into a bug report (transcript of what lead to the sigseg) and an addition gdb<PRNUM> to the testsuite. That way it can be added to the repository. Of course, if you've also got a patch.


Andrew






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]