SIGTRAP breaks the debug session

Sysprogs forums Forums VisualGDB SIGTRAP breaks the debug session

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6402
    raskram
    Participant

     

    Hello,

    I’m new to VisualGDB. I’m using VisualGDB trail with Visual Studio 2012 Ultimate, and ST-LINK/V2 or J-LINK EDU.

    I created today a new project with blinking the LED on my STM3220G-EVAL Board. This blinking demo project works without problem.

    Then I add my files in this blink project, removed the blink.cpp file and configure the Settings.

    The compiler runs without problem.

    After this I wanted to debug the project. First I got this message box:

    “ARM semihosting system call detected. Do you want VisualGDB to handle those calls and emulate a basic console?”

    I clicked “Yes”.

    Directly after this I got the message box: “Received a SIGTRAP: Trace/breakpoint trap”.

    I clicked on “Break”.

    I have no breakpoints set.

    This failure message came everytime at the same point:

    <span style=”color: #0000ff; font-family: Consolas; font-size: small;”>#if</span> <span style=”color: #0000ff; font-family: Consolas; font-size: small;”>defined</span><span style=”font-family: Consolas; font-size: small;”>(ARM_RDI_MONITOR) && !</span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>defined</span><span style=”font-family: Consolas; font-size: small;”>(__ASSEMBLER__)</span>

    <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>static</span></span></span> <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>inline</span></span></span> <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>int</span></span></span>

    <span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>do_AngelSWI (</span></span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>int</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> reason, </span></span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>void</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> * arg)</span></span>

    {

    <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>int</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> value;</span></span>

    <span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> Stop here–>asm </span></span><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>volatile</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> (</span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”mov r0, %1; mov r1, %2; “</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> AngelSWIInsn </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>” %a3; mov %0, r0″</span></span></span>

    <span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> : </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”=r”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> (value) </span></span><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”>/* Outputs */</span></span></span>

    <span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> : </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> (reason), </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> (arg), </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”i”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> (AngelSWI) </span></span><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”>/* Inputs */</span></span></span>

    <span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> : </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r0″</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r1″</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r2″</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”r3″</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”ip”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”lr”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”memory”</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>, </span></span><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”><span style=”color: #a31515; font-family: Consolas; font-size: small;”>”cc”</span></span></span>

    <span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”>/* Clobbers r0 and r1, and lr if in supervisor mode */</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”>);</span></span>

    <span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”><span style=”color: #008000; font-family: Consolas; font-size: small;”>/* Accordingly to page 13-77 of ARM DUI 0040D other registers</span></span></span>

    can also be clobbered. Some memory positions may also be

    changed by a system call, so they should not be kept in

    registers. Note: we are assuming the manual is right and

    Angel is respecting the APCS. */

    <span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”><span style=”color: #0000ff; font-family: Consolas; font-size: small;”>return</span></span></span><span style=”font-family: Consolas; font-size: small;”><span style=”font-family: Consolas; font-size: small;”> value;</span></span>

    }

    #endif

     

    And here is the log:

    [       0 ms] -list-features
    [      16 ms] =thread-group-added,id=”i1″
    [      23 ms] ~”GNU gdb (GDB) 7.8.1\n”
    [      23 ms] ~”Copyright (C) 2014 Free Software Foundation, Inc.\n”
    [      23 ms] ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \”show copying\”\nand \”show warranty\” for details.\n”
    [      23 ms] ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”
    [      23 ms] ~”\nFor bug reporting instructions, please see:\n”
    [      23 ms] ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    [      23 ms] ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    [      23 ms] ~”For help, type \”help\”.\n”
    [      23 ms] ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    [      23 ms] ~”Reading symbols from D:\\……./Debug/SET_Receiver_VS.elf…”
    [      51 ms] ~”done.\n”
    [      53 ms] ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    [      54 ms] -gdb-set stop-on-solib-events 1
    [      63 ms] ^done
    [      63 ms] -gdb-set disassembly-flavor intel
    [      64 ms] ^error,msg=”No symbol \”disassembly\” in current context.”
    [      64 ms] -gdb-set print demangle off
    [      64 ms] ^done
    [      65 ms] -gdb-version
    [      74 ms] ~”GNU gdb (GDB) 7.8.1\n”
    [      74 ms] ~”Copyright (C) 2014 Free Software Foundation, Inc.\n”
    [      74 ms] ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \”show copying\”\nand \”show warranty\” for details.\n”
    [      74 ms] ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”
    [      74 ms] ~”\nFor bug reporting instructions, please see:\n”
    [      74 ms] ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    [      74 ms] ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    [      74 ms] ~”For help, type \”help\”.\n”
    [      74 ms] ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    [      74 ms] ^done
    [     126 ms] -break-insert -f main
    [     137 ms] ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x0800d5fe”,func=”main”,file=”Project/ProjectSrc/main.c”,fullname=”D:\\……\\main.c”,line=”290″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    [     141 ms] target remote :2331
    [     147 ms] &”target remote :2331\n”
    [     151 ms] ~”Remote debugging using :2331\n”
    [     153 ms] =thread-group-started,id=”i1″,pid=”42000″
    [     153 ms] =thread-created,id=”1″,group-id=”i1″
    [     159 ms] ~”0x00000000 in ?? ()\n”
    [     159 ms] *stopped,frame={addr=”0x00000000″,func=”??”,args=[]},thread-id=”1″,stopped-threads=”all”
    [     164 ms] ^done
    [     164 ms] info shared
    [     169 ms] &”info shared\n”
    [     169 ms] ~”No shared libraries loaded at this time.\n”
    [     169 ms] ^done
    [     169 ms] mon reset
    [     179 ms] &”mon reset\n”
    [     199 ms] @”Resetting target\r\n”
    [     200 ms] ^done
    [     200 ms] ^done
    [     200 ms] load
    [     200 ms] &”load\n”
    [     201 ms] ~”Loading section .isr_vector, size 0x184 lma 0x8000000\n”
    [     202 ms] +download,{section=”.isr_vector”,section-size=”388″,total-size=”1890071″}
    [     202 ms] +download,{section=”.isr_vector”,section-sent=”388″,section-size=”388″,total-sent=”388″,total-size=”1890071″}
    [     202 ms] ~”Loading section .text, size 0x775fc lma 0x8000188\n”
    [     202 ms] +download,{section=”.text”,section-size=”488956″,total-size=”1890071″}
    [     243 ms] ~”Loading section .init_array, size 0x4 lma 0x8077784\n”
    [     243 ms] +download,{section=”.init_array”,section-size=”4″,total-size=”1890071″}
    [     244 ms] ~”Loading section .fini_array, size 0x4 lma 0x8077788\n”
    [     244 ms] +download,{section=”.fini_array”,section-size=”4″,total-size=”1890071″}
    [     244 ms] ~”Loading section .data, size 0x958 lma 0x807778c\n”
    [     244 ms] +download,{section=”.data”,section-size=”2392″,total-size=”1890071″}
    [     244 ms] ~”Start address 0x8009128, load size 491744\n”
    [    4043 ms] ~”Transfer rate: 10914 KB/sec, 3965 bytes/write.\n”
    [    4044 ms] ^done
    [    4137 ms] -data-evaluate-expression “sizeof(void *)”
    [    4152 ms] ^done,value=”4″
    [    4152 ms] -data-evaluate-expression “sizeof(int)”
    [    4166 ms] ^done,value=”4″
    [    4166 ms] -data-evaluate-expression “sizeof(short)”
    [    4182 ms] ^done,value=”2″
    [    4182 ms] -data-evaluate-expression “sizeof(long)”
    [    4198 ms] ^done,value=”4″
    [    4198 ms] -data-evaluate-expression “sizeof(long long)”
    [    4204 ms] ^done,value=”8″
    [    4204 ms] -data-evaluate-expression “sizeof(char)”
    [    4206 ms] ^done,value=”1″
    [    4206 ms] -data-evaluate-expression “sizeof(wchar_t)”
    [    4209 ms] ^done,value=”4″
    [    4209 ms] -data-evaluate-expression “sizeof(float)”
    [    4213 ms] ^done,value=”4″
    [    4213 ms] -data-evaluate-expression “sizeof(double)”
    [    4215 ms] ^done,value=”8″
    [    4215 ms] -data-evaluate-expression “sizeof(long double)”
    [    4217 ms] ^done,value=”8″
    [    4455 ms] info target
    [    4458 ms] &”info target\n”
    [    4458 ms] ~”Symbols from \”D:\\…..\\Debug\\xxxxxx.elf\”.\n”
    [    4458 ms] ~”Remote serial target in gdb-specific protocol:\n”
    [    4458 ms] ~”Debugging a target over a serial line.\n”
    [    4458 ms] ~”\tWhile running this, GDB does not access memory from…\n”
    [    4458 ms] ~”Local exec file:\n”
    [    4458 ms] ~”\t`D:\\…….\\Debug\\xxxxxx.elf’, file type elf32-littlearm.\n”
    [    4458 ms] ~”\tEntry point: 0x8009128\n”
    [    4458 ms] ~”\t0x08000000 – 0x08000184 is .isr_vector\n”
    [    4458 ms] ~”\t0x08000188 – 0x08077784 is .text\n”
    [    4458 ms] ~”\t0x08077784 – 0x08077788 is .init_array\n”
    [    4458 ms] ~”\t0x08077788 – 0x0807778c is .fini_array\n”
    [    4458 ms] ~”\t0x20000000 – 0x20000958 is .data\n”
    [    4458 ms] ~”\t0x20000958 – 0x2000b1b8 is .bss\n”
    [    4458 ms] ^done
    [    4498 ms] -exec-continue
    [    4508 ms] ^running
    [    4508 ms] *running,thread-id=”all”
    [    4559 ms] =breakpoint-modified,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x0800d5fe”,func=”main”,file=”Project/ProjectSrc/main.c”,fullname=”D:\\……..\\main.c”,line=”290″,thread-groups=[“i1″],times=”1″,original-location=”main”}
    [    4560 ms] ~”\nBreakpoint ”
    [    4560 ms] ~”1, main () at Project/ProjectSrc/main.c:290\n”
    [    4560 ms] ~”290\t   osInitKernel();\n”
    [    4560 ms] *stopped,reason=”breakpoint-hit”,disp=”keep”,bkptno=”1″,frame={addr=”0x0800d5fe”,func=”main”,args=[],file=”Project/ProjectSrc/main.c”,fullname=”D:\\………\\main.c”,line=”290″},thread-id=”1″,stopped-threads=”all”
    [    4568 ms] -break-delete 1
    [    4570 ms] ^done
    [    4570 ms] -exec-continue
    [    4580 ms] ^running
    [    4580 ms] *running,thread-id=”all”
    [    4607 ms] ~”\nProgram received signal ”
    [    4607 ms] ~”SIGTRAP, Trace/breakpoint trap.\n”
    [    4607 ms] ~”0x08003702 in do_AngelSWI (arg=0x2001bf0c, reason=5) at ../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h:78\n”
    [    4607 ms] &”78\t../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h: No such file or directory.\n”
    [    4607 ms] *stopped,reason=”signal-received”,signal-name=”SIGTRAP”,signal-meaning=”Trace/breakpoint trap”,frame={addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},thread-id=”1″,stopped-threads=”all”
    [    4611 ms] -data-read-memory-bytes 0x8003702 4
    [    4617 ms] ^done,memory=[{begin=”0x08003702″,offset=”0x00000000″,end=”0x08003706″,contents=”abbe0446″}]
    [    4619 ms] -data-list-register-names
    [    4627 ms] ^done,register-names=[“r0″,”r1″,”r2″,”r3″,”r4″,”r5″,”r6″,”r7″,”r8″,”r9″,”r10″,”r11″,”r12″,”sp”,”lr”,”pc”,””,””,””,””,””,””,””,””,””,”xpsr”,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,”MSP”,”PSP”,”PRIMASK”,”BASEPRI”,”FAULTMASK”,”CONTROL”]
    [    4627 ms] -data-list-register-values r10
    [    4637 ms] ^done,register-values=[{number=”0″,value=”0x00000005″},{number=”1″,value=”0x2001bf0c”},{number=”2″,value=”0x00000002″},{number=”3″,value=”0x20004368″},{number=”4″,value=”0x00000005″},{number=”5″,value=”0x2001bf0c”},{number=”6″,value=”0x200000a0″},{number=”7″,value=”0x00000002″},{number=”8″,value=”0x0803e650″},{number=”9″,value=”0x00000002″},{number=”10″,value=”0x7ffffc00″},{number=”11″,value=”0x0803e650″},{number=”12″,value=”0x00000000″},{number=”13″,value=”0x2001bf08″},{number=”14″,value=”0x080036f5″},{number=”15″,value=”0x08003702″},{number=”25″,value=”0x21000000″},{number=”91″,value=”0x2001bf08″},{number=”92″,value=”0x00000000″},{number=”93″,value=”0x00000000″},{number=”94″,value=”0x00000000″},{number=”95″,value=”0x00000000″},{number=”96″,value=”0x00000000″}]
    [   87564 ms] -data-read-memory-bytes 0x2001bf0c 12
    [   87570 ms] ^done,memory=[{begin=”0x2001bf0c”,offset=”0x00000000″,end=”0x2001bf18″,contents=”0000000050e6030802000000″}]
    [   87571 ms] -data-read-memory-bytes 0x803e650 2
    [   87580 ms] ^done,memory=[{begin=”0x0803e650″,offset=”0x00000000″,end=”0x0803e652″,contents=”0d0a”}]
    [   87580 ms] -interpreter-exec console flushregs
    [   87590 ms] ~”Register cache flushed.\n”
    [   87591 ms] ^done
    [   87591 ms] -gdb-set $r0=0x0
    [   87601 ms] ^done
    [   87601 ms] -exec-continue
    [   87611 ms] ^running
    [   87611 ms] *running,thread-id=”all”
    [   87636 ms] ~”\nProgram received signal ”
    [   87636 ms] ~”SIGTRAP, Trace/breakpoint trap.\n”
    [   87636 ms] ~”0x08003702 in do_AngelSWI (arg=0x2001bf0c, reason=5) at ../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h:78\n”
    [   87637 ms] ~”78\tin ../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h\n”
    [   87637 ms] *stopped,reason=”signal-received”,signal-name=”SIGTRAP”,signal-meaning=”Trace/breakpoint trap”,frame={addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},thread-id=”1″,stopped-threads=”all”
    [   87637 ms] -data-list-register-values r10
    [   87647 ms] ^done,register-values=[{number=”0″,value=”0x00000000″},{number=”1″,value=”0x2001bf0c”},{number=”2″,value=”0x00000002″},{number=”3″,value=”0x20004368″},{number=”4″,value=”0x00000005″},{number=”5″,value=”0x2001bf0c”},{number=”6″,value=”0x200000a0″},{number=”7″,value=”0x00000002″},{number=”8″,value=”0x0803e650″},{number=”9″,value=”0x00000002″},{number=”10″,value=”0x7ffffc00″},{number=”11″,value=”0x0803e650″},{number=”12″,value=”0x00000000″},{number=”13″,value=”0x2001bf08″},{number=”14″,value=”0x080036f5″},{number=”15″,value=”0x08003702″},{number=”25″,value=”0x21000000″},{number=”91″,value=”0x2001bf08″},{number=”92″,value=”0x00000000″},{number=”93″,value=”0x00000000″},{number=”94″,value=”0x00000000″},{number=”95″,value=”0x00000000″},{number=”96″,value=”0x00000000″}]
    Unsupported semihosting syscall: 0
    [   87651 ms] -interpreter-exec console flushregs
    [   87657 ms] ~”Register cache flushed.\n”
    [   87657 ms] ^done
    [   87657 ms] -gdb-set $r0=0x0
    [   87658 ms] ^done
    [   87666 ms] -stack-list-frames –thread 1
    [   87679 ms] ^done,stack=[frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},frame={level=”1″,addr=”0x08003702″,func=”_swiwrite”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,line=”302″},frame={level=”2″,addr=”0x08003736″,func=”_write”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,line=”317″},frame={level=”3″,addr=”0x08008720″,func=”_write_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/reent/writer.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/reent/../../../../../../../newlib-2.1.0/newlib/libc/reent/writer.c”,line=”58″},frame={level=”4″,addr=”0x080007b2″,func=”__sfvwrite_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fvwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fvwrite.c”,line=”99″},frame={level=”5″,addr=”0x08000ac4″,func=”_fwrite_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,line=”125″},frame={level=”6″,addr=”0x08000afc”,func=”fwrite”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,line=”166″},frame={level=”7″,addr=”0x0800d61e”,func=”main”,file=”Project/ProjectSrc/main.c”,fullname=”D:\\Users\\schep_000\\Documents\\CloudStation\\ST_Projects\\SET_Receiver_VS\\SET_Receiver_VS\\Project\\ProjectSrc\\main.c”,line=”295″}]
    [   87680 ms] -stack-list-arguments –thread 1 0
    [   87689 ms] ^done,stack-args=[frame={level=”0″,args=[name=”arg”]},frame={level=”1″,args=[name=”file”,name=”ptr”,name=”len”]},frame={level=”2″,args=[name=”file”,name=”ptr”,name=”len”]},frame={level=”3″,args=[name=”ptr”,name=”fd”,name=”buf”,name=”cnt”]},frame={level=”4″,args=[name=”ptr”,name=”fp”,name=”uio”]},frame={level=”5″,args=[name=”ptr”,name=”buf”,name=”size”,name=”count”,name=”fp”]},frame={level=”6″,args=[name=”buf”,name=”size”,name=”count”,name=”fp”]},frame={level=”7″,args=[]}]
    [   87709 ms] -thread-info
    [   87719 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [   87786 ms] -thread-info
    [   87789 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [   87790 ms] -thread-info
    [   87799 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [   87801 ms] -thread-info
    [   87809 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [   87813 ms] -stack-list-frames –thread 1
    [   87820 ms] ^done,stack=[frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},frame={level=”1″,addr=”0x08003702″,func=”_swiwrite”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,line=”302″},frame={level=”2″,addr=”0x08003736″,func=”_write”,file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/syscalls.c”,line=”317″},frame={level=”3″,addr=”0x08008720″,func=”_write_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/reent/writer.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/reent/../../../../../../../newlib-2.1.0/newlib/libc/reent/writer.c”,line=”58″},frame={level=”4″,addr=”0x080007b2″,func=”__sfvwrite_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fvwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fvwrite.c”,line=”99″},frame={level=”5″,addr=”0x08000ac4″,func=”_fwrite_r”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,line=”125″},frame={level=”6″,addr=”0x08000afc”,func=”fwrite”,file=”../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/stdio/../../../../../../../newlib-2.1.0/newlib/libc/stdio/fwrite.c”,line=”166″},frame={level=”7″,addr=”0x0800d61e”,func=”main”,file=”Project/ProjectSrc/main.c”,fullname=”D:\\Users\\schep_000\\Documents\\CloudStation\\ST_Projects\\SET_Receiver_VS\\SET_Receiver_VS\\Project\\ProjectSrc\\main.c”,line=”295″}]
    [   87820 ms] -stack-list-arguments –thread 1 0
    [   87830 ms] ^done,stack-args=[frame={level=”0″,args=[name=”arg”]},frame={level=”1″,args=[name=”file”,name=”ptr”,name=”len”]},frame={level=”2″,args=[name=”file”,name=”ptr”,name=”len”]},frame={level=”3″,args=[name=”ptr”,name=”fd”,name=”buf”,name=”cnt”]},frame={level=”4″,args=[name=”ptr”,name=”fp”,name=”uio”]},frame={level=”5″,args=[name=”ptr”,name=”buf”,name=”size”,name=”count”,name=”fp”]},frame={level=”6″,args=[name=”buf”,name=”size”,name=”count”,name=”fp”]},frame={level=”7″,args=[]}]
    [   87838 ms] -thread-info
    [   87840 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [   87841 ms] -thread-info
    [   87850 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [  128248 ms] -thread-info
    [  128254 ms] ^done,threads=[{id=”1″,target-id=”Thread <main>”,frame={level=”0″,addr=”0x08003702″,func=”do_AngelSWI”,args=[{name=”arg”,value=”0x2001bf0c”},{name=”reason”,value=”5″}],file=”../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,fullname=”/q/gnu/auto/newlib-bu-2.24+gcc-4.9.2+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-2.1.0-arm-eabi/arm-eabi/thumb/cortex_m3/newlib/libc/sys/arm/../../../../../../../../newlib-2.1.0/newlib/libc/sys/arm/swi.h”,line=”78″},state=”stopped”}],current-thread-id=”1″
    [  130096 ms] -var-create –frame 0 –thread 1 – * “/\*\ Clobbers\ r0\ and\ r1,\ and\ lr\ if\ in\ supervisor\ mode\ \*/”
    [  130098 ms] ^error,msg=”-var-create: unable to create variable object”
    [  131126 ms] -var-create –frame 0 –thread 1 – * “\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ changed\ by\ a\ system\ call,\ so\ they\ should\ not\ be\ kept\ in”
    [  131134 ms] ^error,msg=”-var-create: unable to create variable object”
    [  502053 ms] -var-create –frame 0 –thread 1 – * “value”
    [  502060 ms] ^done,name=”var3″,numchild=”0″,value=”5″,type=”int”,thread-id=”1″,has_more=”0″
    [  504628 ms] -gdb-exit
    [  504629 ms] ^exit
    [  504629 ms] =thread-group-exited,id=”i1″

     

    I hope for some help. 🙂

    I would like to use VisualGDB instead of my current development environment.

     

    Regards

     

    #6403
    raskram
    Participant

    Something went wrong with the code, I wanted to post.

    Ok, here again:

    in file: swi.h

    #if defined(ARM_RDI_MONITOR) && !defined(__ASSEMBLER__)

     

    static inline int

    do_AngleSWI (int reason, void * arg)

    {

    int value;

    Stop always here   –>> asm volatile (“mov r0, %1; mov r1, %2; ” AngelSWIInsn ” %a3; mov %0, r0″

    : “=r” (value) /* Outputs */

    : “r” (reason), “r” (arg), “I” (AngelSWI) /* Inputs */

    : “r0”, “r1”, “r2”, “r3”, “ip”, “lr”, “memory”, “cc” );

     

    return value;

    }

    #endif

     

    Regards

    #6442
    support
    Keymaster

    Hi,

    Thanks for reporting this. Looks like there is a bug in our semihosting handler that triggers when used with the texane/ST-Link tool. Please try the following build: http://visualgdb.com/tmp/VisualGDB-5.0.5.355.msi

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.