Questions tagged [gdb]

For questions related to GDB (The GNU Project Debugger) open source debugging software.

The GNU Project Debugger is open source debugging software that can perform both local debugging on host operating systems such as Linux and remote debugging on embedded targets such as ARM via a GDB server / supported JTAG debugger. It's commonly included as the debugger solution in development packages based around open source compilers such as GCC. Full documentation and downloads are available on the GDB project page.

25 questions
19
votes
1 answer

How do I print debug messages to gdb console with STM32 discovery board using GDB, OpenOCD and arm-none-eabi-gcc?

I'm programming an STM32 Cortex M0 discovery board (32F0308DISCOVERY) using OpenOCD, arm-none-eabi-gcc, and gdb. I was wondering if there is any straightforward way to log debug messages over SWD. I've read about the semihosting option, but this…
foldl
  • 591
  • 1
  • 5
  • 14
5
votes
1 answer

GNU ARM Eclipse - flash and run without debug

I have successfully installed and configured Eclipse for ARM development according to this excellent tutorial: http://gnuarmeclipse.github.io/ Almost all the tutorials (including the one above) I have seen provide instructions on how to set up…
Honza Vojtěch
  • 465
  • 6
  • 13
4
votes
1 answer

Using RTOS support in OpenOCD

I can see that OpenOCD is RTOS aware and it supports FreeRTOS, which I'm using at the moment. I have looked at various sources and cannot seem to figure how to use this feature.
errordeveloper
  • 475
  • 4
  • 13
3
votes
2 answers

What does 0x0800f298 in ?? () mean?

I'm using GDB to debug a program for a Cortex M3. In the functions where the program crashes, when I execute line by line (using n), I eventually get: (gdb) n 0x0800f498 in ?? () now if I backtrace (using bt) right after I get: (gdb) bt #0 …
Randomblue
  • 10,953
  • 29
  • 105
  • 178
2
votes
2 answers

Sending commands to semihosting in VSCode + cortex-debug

I'm trying to move away from doing my firmware development in Eclipse GNU MCU for several reasons, mostly related to project maintainability (much easier to integrate CMake such that there is only one build system), and also for better Intellisense…
Timo
  • 1,179
  • 1
  • 12
  • 30
2
votes
2 answers

How to put a breakpoint to after last line of a loop in GDB?

Consider the following loop: 28: while (true) { 29: chThdSleepMilliseconds(1); 30: txbuffer[1] = num_zero + offset; 31: spiExchange(&SPID1, 2, txbuffer, rxbuffer); 32: // we want to examine rxbuffer at this point 33: } I want to…
ceremcem
  • 1,386
  • 17
  • 35
2
votes
1 answer

STM32F0 - interrupt/breakpoint not working on certain hardware

OK I realise this sounds like a dumb/noob question but please do read it through before calling me an idiot - at this stage I'll gladly take it if you can spot where I've gone wrong! The scenario: We have an existing working PCB design using an…
John U
  • 7,041
  • 2
  • 21
  • 34
2
votes
1 answer

Clearing lockup after double fault

I'm debugging an STM32 with gdb. For some reason my program crashes, and gdb gives the following. Note: automatically using hardware breakpoints for read-only addresses. stm32f2xxx.cpu -- clearing lockup after double fault Program received signal…
Randomblue
  • 10,953
  • 29
  • 105
  • 178
1
vote
1 answer

Does ARM gdb not have TUI layout support?

If it run arm-none-eabi-gdb -tui myProject.elf This returns TUI mode is not supported If I run it without the -tui flag and try to call lay or layout in gdb it does not recognize the command, however if I run normal gdb not the arm-none-eabi-gdb…
Edwin Fairchild
  • 871
  • 13
  • 22
1
vote
2 answers

Error in final launch sequence Failed for OpenOCD (Olimex) for ARM (STM32fxx)

I am using openOCD in eclipse for the arm STM32F10x series. After writing the whole code and building everything without error in the program, I am going to debug it and I am getting an error after completion of 99% of the process. The following…
sHaR
  • 21
  • 2
1
vote
1 answer

Debugging Cortex-M7 with data cache

I'm using gdb, openocd and stlink to debug an application running on STM32H7. When data cache (DCache) is enabled, debugger does not show correct values. For example if I run this: int foo; int main() { foo = 1234; while(1); } debugger…
jpa
  • 6,804
  • 17
  • 32
1
vote
1 answer

Atollic + STM32F4 + ST-Link v2 connection problem "Unknown MCU found on target"

I currently have a problem with the connection between the debugger ST-Link V2, ARM Atollic 8.0.0 and a custom board with STM32F469. The Atollic and the ST-Link utility believe the Target is halted (and can't load programs or debug), the…
1
vote
1 answer

How do I add STM32F4 support to GDB client for watchpoints?

I have been trying to debug my code and realized that my watchpoints for variable never execute. When I looked into this problem online, I encountered similar situations and the response they received was their microcontroller may not be supported.…
h3y4w
  • 47
  • 8
1
vote
1 answer

When issuing GDB `continue` in RAM, can I write to the adresses from which I `continue`d?

I'm just writing some test programs in order to get to know the STM32F4 (ARM Cortex M4). The development board I'm using has U-Boot preinstalled in flash. When the board is up and running and U-Boot is showing it's command prompt, I'm connecting…
Multisync
  • 215
  • 1
  • 2
  • 7
1
vote
1 answer

Why is it necessary to halt program execution for the breakpoint to be effective?

When I'm following this procedure, program execution is successfully stopped when the payload program is run: Setting breakpoint to beginning of program which is gets loaded by the bootloader afterwards. The breakpoint gets set with the GDB command…
Multisync
  • 215
  • 1
  • 2
  • 7
1
2