GDB - create breakpoints with absolute path doesn't work
I'm using the gdb from within Code::Blocks
It seems, that Code::Blocks creates the Breakpoints always with absolute Paths to the sourcefile which causes an Error in GDB:
#######
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\
Adding source dir: C:\Users\
Adding file: C:\Users\
Changing directory to: C:/Users/
[debug]
[debug]
[debug]Working dir : C:\Users\
Starting debugger: C:\Program Files (x86)\GNU Tools ARM Embedded\4.6 2012q1\
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints
[debug]Reading symbols from C:/Users/
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GNU Tools for ARM Embedded Processors) 7.3.1.20120316-cvs
[debug]Copyright (C) 2011 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "--host=
[debug]For bug reporting instructions, please see:
[debug]<http://
[debug]
[debug]> set confirm off
Debugger name and version: GNU gdb (GNU Tools for ARM Embedded Processors) 7.3.1.20120316-cvs
[debug]
[debug]> set width 0
[debug]
[debug]> set height 0
[debug]
[debug]> set breakpoint pending on
[debug]
[debug]> set print asm-demangle on
[debug]
[debug]> set unwindonsignal on
[debug]
[debug]> set print elements 0
[debug]
[debug]> set debugevents on
[debug]No symbol "debugevents" in current context.
[debug]
[debug]> set disassembly-flavor att
[debug]No symbol "disassembly" in current context.
[debug]
[debug]> source C:\Program Files (x86)\CodeBlock
[debug]
[debug]> directory C:/Users/
[debug]
[debug]> set tdesc filename gdb-conf.xml
[debug]
[debug]> target remote tcp:localhost:61234
[debug]
[debug]
[debug]
Connected
[debug]> load
At C:/Users/
[debug]> load
[debug]Loading section .isr_vector, size 0x188 lma 0x8000000
[debug]Loading section .text, size 0x2874 lma 0x8000188
[debug]Loading section .ARM, size 0x8 lma 0x80029fc
[debug]Loading section .init_array, size 0x8 lma 0x8002a04
[debug]Loading section .fini_array, size 0x4 lma 0x8002a0c
[debug]Loading section .data, size 0x464 lma 0x8002a10
[debug]Loading section .jcr, size 0x4 lma 0x8002e74
[debug]Start address 0x80026b9, load size 11896
[debug]Transfer rate: 1 KB/sec, 1189 bytes/write.
[debug]
[debug]> monitor reset
[debug]Loading section .isr_vector, size 0x188 lma 0x8000000
[debug]Loading section .text, size 0x2874 lma 0x8000188
[debug]Loading section .ARM, size 0x8 lma 0x80029fc
[debug]Loading section .init_array, size 0x8 lma 0x8002a04
[debug]Loading section .fini_array, size 0x4 lma 0x8002a0c
[debug]Loading section .data, size 0x464 lma 0x8002a10
[debug]Loading section .jcr, size 0x4 lma 0x8002e74
[debug]Start address 0x80026b9, load size 11896
[debug]Transfer rate: 1 KB/sec, 1189 bytes/write.
[debug]
[debug]> break "C:/Users/
[debug]STM32 Successfully completed reset operation
[debug]No source file named C.
[debug]
STM32 Successfully completed reset operation
No source file named C.
[debug]> continue
[debug]
[debug]Program received signal SIGINT, Interrupt.
[debug]0x080011e0 in framebuffer_refresh () at oled\framebuffe
[debug]
[debug]
Program received signal SIGINT, Interrupt.
At C:/Users/
> break main.c:13
[debug]> break main.c:13
[debug]Breakpoint 2 at 0x80018a2: file main.c, line 13.
[debug]
Breakpoint 2 at 0x80018a2: file main.c, line 13.
#######
when i manually send a command to add the breakpoint with a relative path to the source file everything works as expceted.
another weird thing is that the "load" command gets executed twice (but the command to be sent exists only once..)
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask andre for more information if necessary.