cancel
Showing results for 
Search instead for 
Did you mean: 

gdb SIGTRAP

samcharnet
Associate II
Posted on January 31, 2013 at 13:38

Hi,

I have a problem for the second time, I don't know why but hardware breakpoint, sometimes, still in stm and I can't delete it. I use OpenOCD 0.6.1 and gdb This is my gdb log :

lucky@srv-dev:~/Devel/Stm32/FreeRTOSV7.3.0/FreeRTOS/Demo/PLSee$ arm-none-eabi-gdb ./PLSee.axf 
GNU gdb (Linaro GDB) 7.5-212-1
Copyright (C) 2012 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-linux-gnu --target=arm-none-eabi''.
For bug reporting instructions, please see:
<
http:
//bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/lucky/Devel/Stm32/FreeRTOSV7.3.0/FreeRTOS/Demo/PLSee/PLSee.axf...done.
(gdb) target remote :3333
Remote debugging using :3333
chart_line_serie_draw () at ../../chartlib/chart_line_serie.c:332
332 if (m_bShadow || m_bSmooth)
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
chart_line_serie_draw () at ../../chartlib/chart_line_serie.c:332
332 if (m_bShadow || m_bSmooth)
(gdb) 

and OpenOCD :

> reset halt 
JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080249cc msp: 0x20020000
> flash probe 0 
device id = 0x10016413
flash size = 1024kbytes
flash 'stm32f2x' found at 0x08000000
> flash write_image erase PLSee.axf 
auto erase enabled
wrote 262144 bytes from file PLSee.axf in 8.714481s (376 KiB/s)
> reset 
JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
target state: halted
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x0801679a psp: 0x20001640
accepting 'gdb' connection from 3333
acknowledgment received, but no packet pending
> 

I haven't found usefull information about that. What can I do ? The last time, the problem disappear after many upload, but I don't know why..
3 REPLIES 3
samcharnet
Associate II
Posted on January 31, 2013 at 21:57

No one can help me ?

I have moved the fonction elsewhere and It was resolv the problem for a moment but, now I have 2 hardware breakpoint in the sky with diamond, look at log :

(gdb) target remote :3333
Remote debugging using :3333
0x08024a24 in Reset_Handler ()
(gdb) monitor reset
JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0801679a in chart_line_serie_draw () at ../../chartlib/chart_line_serie.c:322
322 {
(gdb) info b
No breakpoints or watchpoints.
(gdb) b chart_xy_serie_init 
Breakpoint 1 at 0x801583c: file ../../chartlib/chart_xy_serie.c, line 9.
(gdb) b chart_line_serie_init 
Breakpoint 2 at 0x801651c: file ../../chartlib/chart_line_serie.c, line 
(gdb) b chart_line_serie_draw
Breakpoint 3 at 0x801679c: file ../../chartlib/chart_line_serie.c, line 
(gdb) b chart_line_serie_draw_all 
Breakpoint 4 at 0x80165ae: file ../../chartlib/chart_line_serie.c, line 
(gdb) b chart_serie_set_u8g
Breakpoint 5 at 0x80171c4: file ../../chartlib/chart_serie.c, line 
(gdb) b chart_serie_xscreen_to_value
Breakpoint 6 at 0x80171e4: file ../../chartlib/chart_serie.c, line 
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
Warning:
Cannot insert hardware breakpoint 5.
Cannot insert hardware breakpoint 6.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x0801583c in chart_xy_serie_init at ../../chartlib/chart_xy_serie.c:9
2 breakpoint keep y 0x0801651c in chart_line_serie_init at ../../chartlib/chart_line_serie.c:124
3 breakpoint keep y 0x0801679c in chart_line_serie_draw at ../../chartlib/chart_line_serie.c:327
4 breakpoint keep y 0x080165ae in chart_line_serie_draw_all at ../../chartlib/chart_line_serie.c:161
5 breakpoint keep y 0x080171c4 in chart_serie_set_u8g at ../../chartlib/chart_serie.c:71
6 breakpoint keep y 0x080171e4 in chart_serie_xscreen_to_value at ../../chartlib/chart_serie.c:84
(gdb) c
Continuing.
Warning:
Cannot insert hardware breakpoint 5.
Cannot insert hardware breakpoint 6.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
(gdb)

I have tried to upload a minimal program the reupload mine, the breakpoint still alive. I have tried to insert 6 breakpoints to erase old one but Gdb don't see the breakpoint from other session. I don't know what to do..
Posted on January 31, 2013 at 23:05

No one can help me ?

Perhaps you need to find an OpenOCD / GDB focused mailing list / forum.

I guess I'd look at the OpenOCD .cfg files, and see if OpenOCD registers the core has 6 breakpoints, and 4 watchpoints.

Some may be consumed for reset or run to main() breakpoints.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
samcharnet
Associate II
Posted on February 01, 2013 at 00:30

I have checked my openOCD.cfg, it is ok. It may be a gdb bug.

I have fix the problem, I don't know how. Many hours of search... And it finally come back to life. Now I have my 6 breakpoints and the programme don't stop anymore on an invisible breakpoint.. I will post on openOCD mailing list for the next time, this problem is time consuming..

Reading symbols from /home/lucky/Devel/Stm32/FreeRTOSV7.3.0/FreeRTOS/Demo/KONIX_STM32F4-DISCOVERY/PLSee.axf...done.
(gdb) target remote :3333
Remote debugging using :3333
0x080253c0 in Reset_Handler ()
(gdb) b main
Breakpoint 1 at 0x80031ba: file RTOSDemo/main.c, line 
(gdb) b chart_xy_serie_init 
Breakpoint 2 at 0x80161d8: file ../../chartlib/chart_xy_serie.c, line 9.
(gdb) b chart_xy_serie_add_point
Breakpoint 3 at 0x80161f6: file ../../chartlib/chart_xy_serie.c, line 
(gdb) b chart_xy_serie_add_points 
Breakpoint 4 at 0x8016236: file ../../chartlib/chart_xy_serie.c, line 
(gdb) b chart_xy_serie_get_bezier_control_points 
Breakpoint 5 at 0x80163d2: file ../../chartlib/chart_xy_serie.c, line 
(gdb) b chart_xy_serie_get_first_control_points 
Breakpoint 6 at 0x80167a6: file ../../chartlib/chart_xy_serie.c, line 
(gdb) c
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
WARNING! The target is already running. All changes GDB did to registers will be discarded! Waiting for target to halt.
Breakpoint 1, main () at RTOSDemo/main.c:377
377 xQueue=xQueueCreate(1,queueSIZE*sizeof(uint8_t));
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x080031ba in main at RTOSDemo/main.c:377
breakpoint already hit 1 time
2 breakpoint keep y 0x080161d8 in chart_xy_serie_init at ../../chartlib/chart_xy_serie.c:9
3 breakpoint keep y 0x080161f6 in chart_xy_serie_add_point at ../../chartlib/chart_xy_serie.c:16
4 breakpoint keep y 0x08016236 in chart_xy_serie_add_points at ../../chartlib/chart_xy_serie.c:28
5 breakpoint keep y 0x080163d2 in chart_xy_serie_get_bezier_control_points at ../../chartlib/chart_xy_serie.c:90
6 breakpoint keep y 0x080167a6 in chart_xy_serie_get_first_control_points at ../../chartlib/chart_xy_serie.c:158
(gdb) 

Thanks for trying to help 😉