Author Topic: Can't get GDB 6.7.1 working  (Read 6986 times)

Offline fackue

  • Multiple posting newcomer
  • *
  • Posts: 10
Can't get GDB 6.7.1 working
« on: February 25, 2008, 07:14:51 am »
Hi all,

I'm currently trying to get GDB 6.7.1 working with CodeBlocks but I can't get it working.

Here's my log:

Code: [Select]
PATH=.;C:\Program Files\CodeBlocks\dc\sh-elf\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Smart Projects\IsoBuster;C:\Program Files\QuickTime\QTSystem\
Command-line: C:\Program Files\CodeBlocks\dc\sh-elf\bin\sh-elf-gdb.exe -nx -fullname  -quiet -args hello.elf
Working dir : C:\cb_mingw_test\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=sh-elf".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
No symbol "debugevents" in current context.
>>>>>>cb_gdb:
> set new-console on
No symbol "new" in current context.
>>>>>>cb_gdb:
> set disassembly-flavor att
No symbol "disassembly" in current context.
>>>>>>cb_gdb:
> target remote: 2159
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
gdb_init () at gdb_stub.c:989
warning: Invalid remote reply:
c:\MinGW\dreamcast\kos\kernel\arch\dreamcast\kernel/gdb_stub.c:989:24742:beg:0x8c010ed4
>>>>>>cb_gdb:
> directory C:/cb_mingw_test/
>>>>>>cb_gdb:
> run

I just tried using GDB manually and have it working using the following commands:

Code: [Select]
sh-elf-gdb "C:\Documents and Settings\Cyle\Desktop\cb_mingw_test\hello.elf"
target remote: 2159
next

Code: [Select]
sh-elf-gdb.exe "c:\Documents and Settings\Cyle\Desktop\cb_mingw_test\hello.elf"
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-mingw32 --target=sh-elf"...
(gdb) target remote: 2159
Remote debugging using : 2159
gdb_init () at gdb_stub.c:989
989     }
(gdb) next
main (argc=255, argv=0x8c010e20)
    at C:\Documents and Settings\Cyle\Desktop\cb_mingw_test\main.c:7
7           printf("\nHello world!\n\n");

Any ideas?

Thanks!

Offline fackue

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Can't get GDB 6.7.1 working
« Reply #1 on: February 25, 2008, 10:59:00 am »
"run" appears to be the biggest problem since from what I've gathered it would only work in some situations. Not quite sure how GDB really works to be honest. I'm running a ELF on another system so run ends up resetting the system entirely. The warnings aren't a problem most likely as it's most likely my fault but if there's any way you guys can give us control on what commands are sent to GDB I think the more technically inclined would be able to find their way around. Or at least change "run" to "continue."

Offline fackue

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Can't get GDB 6.7.1 working
« Reply #2 on: February 25, 2008, 12:25:10 pm »
Ticking "Do not run the debugee" fixes it, kind of. When I click the continue button the run command is sent. Shouldn't it be "continue"?
« Last Edit: February 25, 2008, 12:35:36 pm by fackue »