Skip to content

Black Magic Probe creates phantom second inferior/thread on continue, breaking debugging #1182

@twhiston

Description

@twhiston

When debugging with Black Magic Probe using servertype: "external", the first -exec-continue command causes GDB to report a new inferior (i2 with pid 42000), which cortex-debug interprets as a second thread. This phantom Thread 2 has no symbols (func="??") and breaks debugging:

  • Step-over fails with "Cannot find bounds of current function"
  • The debugger switches to this second Thread 1 (it is shown as Thread 1 in the UI) on breakpoint hits
  • Thread 2 shows the same address as Thread 1 but without symbol resolution

When using BMP with target extended-remote, GDB's async mode (mi-async on, which cortex-debug enables) causes GDB to emit =thread-group-added,id="i2" notifications on continue. This appears to be a quirk of how BMP reports breakpoint hits in extended-remote mode.

Debug Log Highlights (might not exactly match the output pasted further down, I ran it again to generate that as I'd not previously saved the full logs):

Initial attach works correctly with 1 thread:
16-interpreter-exec console "attach 1"
-> =thread-group-started,id="i1",pid="1"
-> =thread-created,id="1",group-id="i1"
...
24-thread-list-ids
-> 24^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1"

After first continue, phantom inferior appears:
29-exec-continue --thread 1
-> 29^running
-> *running,thread-id="all"
-> =thread-group-added,id="i2"
-> ~"[New inferior 2]\n"
-> =thread-group-started,id="i2",pid="42000"
-> &"warning: No executable has been specified and target does not support\ndetermining executable automatically. Try using the "file" command."
-> =thread-created,id="2",group-id="i2"
-> ~"[New Thread 1]\n"
-> *stopped,reason="signal-received",signal-name="SIGTRAP",...,thread-id="2",stopped-threads="all"
Now cortex-debug shows 2 threads, with Thread 2 having no symbols:
30-thread-list-ids
-> 30^done,thread-ids={thread-id="1",thread-id="2"},current-thread-id="2",number-of-threads="2"

Thread 1: func="main", has symbols ✓
Thread 2: func="??", no symbols ✗

What I've tried (none work):

  • set print inferior-events off
  • set detach-on-fork on
  • set schedule-multiple off
  • remove-inferiors 2 in postAttachCommands (phantom appears after continue, not attach)
  • rtos: "none" (not supported with external servertype)
  • Native servertype: "bmp" - same issue
  • Various debuggerArgs to set mi-async off - can't change after connection

Note: PlatformIO's debugger works correctly with the same BMP and target. Their debug adapter appears to filter out or ignore these phantom inferior notifications.

It would be great if there was a way to work around this. eg:

  • Having an option to ignore thread-group-added notifications for inferiors beyond the primary one
  • or for BMP servertype, automatically filter out phantom inferiors
  • or provide an overrideContinueCommands option so users can work around this

launch.json:

{
  "name": "Black Magic Probe (Attach)",
  "type": "cortex-debug",
  "request": "attach",
  "cwd": "${workspaceFolder}",
  "executable": "${workspaceFolder}/build/zephyr/zephyr.elf",
  "servertype": "external",
  "gdbTarget": "/dev/cu.usbmodem98B6A4C21",
  "gdbPath": "/path/to/arm-zephyr-eabi-gdb",
  "overrideAttachCommands": [
    "set confirm off",
    "set pagination off",
    "target extended-remote /dev/cu.usbmodem98B6A4C21",
    "set mem inaccessible-by-default off",
    "monitor swdp_scan",
    "attach 1",
    "set mem inaccessible-by-default on",
    "set remote hardware-breakpoint-limit 6",
    "set remote hardware-watchpoint-limit 4"
  ]
}

Screenshots

Image

Environment:

  • Cortex-Debug Version: 1.12.1
  • OS: macOS Sequoia 15.7.1 (Darwin 24.6.0)
  • GDB Version: arm-zephyr-eabi-gdb 12.1 (Zephyr SDK 0.17.4)
  • Compiler Toolchain Version: arm-zephyr-eabi 0.17.4
  • Target: NXP i.MXRT1062 (Cortex-M7)
  • Debug probe: Black Magic Probe

Attach text from Debug Console

Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
"configuration": {
    "name": "Black Magic Probe (Attach)",
    "type": "cortex-debug",
    "request": "attach",
    "cwd": "/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest",
    "executable": "/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf",
    "servertype": "external",
    "gdbTarget": "/dev/cu.usbmodem98B6A4C21",
    "showDevDebugOutput": "both",
    "gdbPath": "/Users/twhiston/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
    "swoConfig": {
        "enabled": false,
        "source": "probe",
        "decoders": []
    },
    "overrideAttachCommands": [
        "set confirm off",
        "set pagination off",
        "target extended-remote /dev/cu.usbmodem98B6A4C21",
        "set mem inaccessible-by-default off",
        "monitor swdp_scan",
        "attach 1",
        "set print inferior-events off",
        "set mem inaccessible-by-default on",
        "set remote hardware-breakpoint-limit 6",
        "set remote hardware-watchpoint-limit 4"
    ],
    "postAttachCommands": [
        "set print inferior-events off"
    ],
    "__configurationTarget": 6,
    "gdbServerConsolePort": 55878,
    "pvtAvoidPorts": [],
    "chainedConfigurations": {
        "enabled": false
    },
    "debuggerArgs": [],
    "rttConfig": {
        "enabled": false,
        "decoders": []
    },
    "graphConfig": [],
    "preLaunchCommands": [],
    "postLaunchCommands": [],
    "preAttachCommands": [],
    "preRestartCommands": [],
    "postRestartCommands": [],
    "preResetCommands": [],
    "postResetCommands": [],
    "toolchainPrefix": "arm-none-eabi",
    "extensionPath": "/Users/twhiston/.vscode/extensions/marus25.cortex-debug-1.12.1",
    "registerUseNaturalFormat": true,
    "variableUseNaturalFormat": true,
    "pvtVersion": "1.12.1",
    "__sessionId": "9f2717d4-d175-410d-92f8-598015301fee",
    "pvtShowDevDebugOutput": "both"
}
Reading symbols from /Users/twhiston/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-objdump --syms -C -h -w /Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf
Reading symbols from /Users/twhiston/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-nm --defined-only -S -l -C -p /Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf
Launching GDB: /Users/twhiston/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb -q --interpreter=mi2
1-gdb-version
Finished reading symbols from objdump: Time: 25 ms
Finished reading symbols from nm: Time: 36 ms
-> =thread-group-added,id="i1"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-added","output":[["id","i1"]]}]}
-> ~"GNU gdb (Zephyr SDK 0.17.4) 12.1\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"GNU gdb (Zephyr SDK 0.17.4) 12.1\n"}]}
-> ~"Copyright (C) 2022 Free Software Foundation, Inc.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Copyright (C) 2022 Free Software Foundation, Inc.\n"}]}
-> ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."}]}
-> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\nType \"show copying\" and \"show warranty\" for details.\n"}]}
-> ~"This GDB was configured as \"--host=aarch64-build_apple-darwin23.6.0 --target=arm-zephyr-eabi\".\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"This GDB was configured as \"--host=aarch64-build_apple-darwin23.6.0 --target=arm-zephyr-eabi\".\n"}]}
-> ~"Type \"show configuration\" for configuration details.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Type \"show configuration\" for configuration details.\n"}]}
-> ~"For bug reporting instructions, please see:\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"For bug reporting instructions, please see:\n"}]}
-> ~"<https://github.com/zephyrproject-rtos/sdk-ng/issues>.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"<https://github.com/zephyrproject-rtos/sdk-ng/issues>.\n"}]}
-> ~"Find the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/software/gdb/documentation/>."
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Find the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/software/gdb/documentation/>."}]}
-> ~"\n\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\n\n"}]}
-> ~"For help, type \"help\".\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"For help, type \"help\".\n"}]}
-> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Type \"apropos word\" to search for commands related to \"word\".\n"}]}
-> 1^done
GDB -> App: {"output":"","token":1,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
2-gdb-set mi-async on
-> 2^done
GDB -> App: {"output":"","token":2,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
3-interpreter-exec console "set print demangle on"
-> 3^done
GDB -> App: {"output":"","token":3,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
4-interpreter-exec console "set print asm-demangle on"
-> =cmd-param-changed,param="print asm-demangle",value="on"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","print asm-demangle"],["value","on"]]}]}
-> 4^done
GDB -> App: {"output":"","token":4,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
5-enable-pretty-printing
-> 5^done
GDB -> App: {"output":"","token":5,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
6-interpreter-exec console "source /Users/twhiston/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdbsupport.init"
-> 6^done
GDB -> App: {"output":"","token":6,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
7-interpreter-exec console "source /Users/twhiston/.vscode/extensions/marus25.cortex-debug-1.12.1/support/gdb-swo.init"
-> =cmd-param-changed,param="language",value="c"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","language"],["value","c"]]}]}
-> =cmd-param-changed,param="language",value="auto"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","language"],["value","auto"]]}]}
-> 7^done
GDB -> App: {"output":"","token":7,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
8-interpreter-exec console "set output-radix 0xa"
-> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Output radix now set to decimal 10, hex a, octal 12.\n"}]}
Output radix now set to decimal 10, hex a, octal 12.
-> 8^done
GDB -> App: {"output":"","token":8,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
9-interpreter-exec console "set input-radix 0xa"
-> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Input radix now set to decimal 10, hex a, octal 12.\n"}]}
Input radix now set to decimal 10, hex a, octal 12.
-> 9^done
GDB -> App: {"output":"","token":9,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
10-file-exec-and-symbols "/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf"
-> 10^done
GDB -> App: {"output":"","token":10,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
11-target-select extended-remote /dev/cu.usbmodem98B6A4C21
-> 11^connected
GDB -> App: {"output":"","token":11,"outOfBandRecord":[],"resultRecords":{"resultClass":"connected","results":[]}}
12-interpreter-exec console "set confirm off"
-> =cmd-param-changed,param="confirm",value="off"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","confirm"],["value","off"]]}]}
-> 12^done
GDB -> App: {"output":"","token":12,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
13-interpreter-exec console "set pagination off"
-> =cmd-param-changed,param="pagination",value="off"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","pagination"],["value","off"]]}]}
-> 13^done
GDB -> App: {"output":"","token":13,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
14-interpreter-exec console "target extended-remote /dev/cu.usbmodem98B6A4C21"
-> ~"Remote debugging using /dev/cu.usbmodem98B6A4C21\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Remote debugging using /dev/cu.usbmodem98B6A4C21\n"}]}
Remote debugging using /dev/cu.usbmodem98B6A4C21
-> 14^done
GDB -> App: {"output":"","token":14,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
15-interpreter-exec console "set mem inaccessible-by-default off"
-> =cmd-param-changed,param="mem inaccessible-by-default",value="off"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","mem inaccessible-by-default"],["value","off"]]}]}
-> 15^done
GDB -> App: {"output":"","token":15,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
16-interpreter-exec console "monitor swdp_scan"
-> @"Target voltage: 3.3V\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":"Target voltage: 3.3V\n"}]}
Target voltage: 3.3V
-> @"Available Targets:\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":"Available Targets:\n"}]}
Available Targets:
-> @"No. Att Driver\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":"No. Att Driver\n"}]}
No. Att Driver
-> @" 1      i.MXRT1062 M7\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":" 1      i.MXRT1062 M7\n"}]}
 1      i.MXRT1062 M7
-> 16^done
GDB -> App: {"output":"","token":16,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
17-interpreter-exec console "attach 1"
-> ~"Attaching to program: /Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf, Remote target\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Attaching to program: /Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf, Remote target\n"}]}
Attaching to program: /Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/build/primary/zephyr/zephyr.elf, Remote target
-> =thread-group-started,id="i1",pid="1"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-started","output":[["id","i1"],["pid","1"]]}]}
-> =thread-created,id="1",group-id="i1"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-created","output":[["id","1"],["group-id","i1"]]}]}
-> *running,thread-id="1"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","1"]]}]}
mi2.status = running
-> 17^done
GDB -> App: {"output":"","token":17,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
-> ~"__enable_irq () at /Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h:800\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"__enable_irq () at /Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h:800\n"}]}
__enable_irq () at /Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h:800
18-interpreter-exec console "set print inferior-events off"
-> ~"800\t  __ASM volatile (\"cpsie i\" : : : \"memory\");\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"800\t  __ASM volatile (\"cpsie i\" : : : \"memory\");\n"}]}
800	  __ASM volatile ("cpsie i" : : : "memory");
-> *stopped,frame={addr="0x60005184",func="__enable_irq",args=[],file="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",fullname="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",line="800",arch="armv7e-m"},thread-id="1",stopped-threads="all"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["frame",[["addr","0x60005184"],["func","__enable_irq"],["args",[]],["file","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["fullname","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["line","800"],["arch","armv7e-m"]]],["thread-id","1"],["stopped-threads","all"]]}]}
mi2.status = stopped
Program stopped, probably due to a reset and/or halt issued by debugger
-> =cmd-param-changed,param="print inferior-events",value="off"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","print inferior-events"],["value","off"]]}]}
-> 18^done
GDB -> App: {"output":"","token":18,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
19-interpreter-exec console "set mem inaccessible-by-default on"
-> =cmd-param-changed,param="mem inaccessible-by-default",value="on"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","mem inaccessible-by-default"],["value","on"]]}]}
-> 19^done
GDB -> App: {"output":"","token":19,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
20-interpreter-exec console "set remote hardware-breakpoint-limit 6"
-> =cmd-param-changed,param="remote hardware-breakpoint-limit",value="6"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","remote hardware-breakpoint-limit"],["value","6"]]}]}
-> 20^done
GDB -> App: {"output":"","token":20,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
21-interpreter-exec console "set remote hardware-watchpoint-limit 4"
-> =cmd-param-changed,param="remote hardware-watchpoint-limit",value="4"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","remote hardware-watchpoint-limit"],["value","4"]]}]}
-> 21^done
GDB -> App: {"output":"","token":21,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
22-interpreter-exec console "set print inferior-events off"
-> 22^done
GDB -> App: {"output":"","token":22,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}}
23-break-insert "/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c:38"
-> ~"Note: automatically using hardware breakpoints for read-only addresses.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Note: automatically using hardware breakpoints for read-only addresses.\n"}]}
Note: automatically using hardware breakpoints for read-only addresses.
-> 23^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x600025ce",func="main",file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",thread-groups=["i1"],times="0",original-location="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c:38"}
GDB -> App: {"output":"","token":23,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["bkpt",[["number","1"],["type","breakpoint"],["disp","keep"],["enabled","y"],["addr","0x600025ce"],["func","main"],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["thread-groups",["i1"]],["times","0"],["original-location","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c:38"]]]]}}
24-break-insert "/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c:45"
-> 24^error,msg="No line 45 in file \"/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c\"."
GDB -> App: {"output":"","token":24,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","No line 45 in file \"/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c\"."]]}}
25-thread-list-ids
-> 25^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1"
GDB -> App: {"output":"","token":25,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["thread-ids",[["thread-id","1"]]],["current-thread-id","1"],["number-of-threads","1"]]}}
26-thread-info 1
-> 26^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0x60005184",func="__enable_irq",args=[],file="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",fullname="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",line="800",arch="armv7e-m"},state="stopped"}]
GDB -> App: {"output":"","token":26,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x60005184"],["func","__enable_irq"],["args",[]],["file","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["fullname","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["line","800"],["arch","armv7e-m"]]],["state","stopped"]]]]]}}
27-stack-list-frames --thread 1 0 19
-> 27^done,stack=[frame={level="0",addr="0x60005184",func="__enable_irq",file="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",fullname="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",line="800",arch="armv7e-m"},frame={level="1",addr="0x60005184",func="arch_cpu_idle",file="/Users/twhiston/Code/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c",fullname="/Users/twhiston/Code/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c",line="104",arch="armv7e-m"},frame={level="2",addr="0x60005940",func="k_cpu_idle",file="/Users/twhiston/Code/zephyrproject/zephyr/include/zephyr/kernel.h",fullname="/Users/twhiston/Code/zephyrproject/zephyr/include/zephyr/kernel.h",line="6608",arch="armv7e-m"},frame={level="3",addr="0x60005940",func="idle",file="/Users/twhiston/Code/zephyrproject/zephyr/kernel/idle.c",fullname="/Users/twhiston/Code/zephyrproject/zephyr/kernel/idle.c",line="75",arch="armv7e-m"}]
GDB -> App: {"output":"","token":27,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x60005184"],["func","__enable_irq"],["file","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["fullname","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["line","800"],["arch","armv7e-m"]]],["frame",[["level","1"],["addr","0x60005184"],["func","arch_cpu_idle"],["file","/Users/twhiston/Code/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c"],["fullname","/Users/twhiston/Code/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c"],["line","104"],["arch","armv7e-m"]]],["frame",[["level","2"],["addr","0x60005940"],["func","k_cpu_idle"],["file","/Users/twhiston/Code/zephyrproject/zephyr/include/zephyr/kernel.h"],["fullname","/Users/twhiston/Code/zephyrproject/zephyr/include/zephyr/kernel.h"],["line","6608"],["arch","armv7e-m"]]],["frame",[["level","3"],["addr","0x60005940"],["func","idle"],["file","/Users/twhiston/Code/zephyrproject/zephyr/kernel/idle.c"],["fullname","/Users/twhiston/Code/zephyrproject/zephyr/kernel/idle.c"],["line","75"],["arch","armv7e-m"]]]]]]}}
28-stack-info-frame --thread 1 --frame 0
-> 28^done,frame={level="0",addr="0x60005184",func="__enable_irq",file="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",fullname="/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h",line="800",arch="armv7e-m"}
GDB -> App: {"output":"","token":28,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["frame",[["level","0"],["addr","0x60005184"],["func","__enable_irq"],["file","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["fullname","/Users/twhiston/Code/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include/cmsis_gcc.h"],["line","800"],["arch","armv7e-m"]]]]}}
29-stack-list-variables --thread 1 --frame 0 --simple-values
-> 29^done,variables=[]
GDB -> App: {"output":"","token":29,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["variables",[]]]}}
30-exec-continue --thread 1
-> 30^running
GDB -> App: {"output":"","token":30,"outOfBandRecord":[],"resultRecords":{"resultClass":"running","results":[]}}
-> *running,thread-id="all"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","all"]]}]}
mi2.status = running
-> =thread-group-added,id="i2"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-added","output":[["id","i2"]]}]}
-> =thread-group-started,id="i2",pid="42000"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-started","output":[["id","i2"],["pid","42000"]]}]}
-> &"warning: No executable has been specified and target does not support\ndetermining executable automatically.  Try using the \"file\" command."
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"log","content":"warning: No executable has been specified and target does not support\ndetermining executable automatically.  Try using the \"file\" command."}]}
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
-> &"\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"log","content":"\n"}]}

-> =thread-created,id="2",group-id="i2"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-created","output":[["id","2"],["group-id","i2"]]}]}
-> ~"[New Thread 1]\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"[New Thread 1]\n"}]}
[New Thread 1]
-> ~"\nThread "
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\nThread "}]}

Thread
-> ~"2.1 received signal SIGTRAP, Trace/breakpoint trap.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"2.1 received signal SIGTRAP, Trace/breakpoint trap.\n"}]}
2.1 received signal SIGTRAP, Trace/breakpoint trap.
-> ~"[Switching to Thread 1]\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"[Switching to Thread 1]\n"}]}
[Switching to Thread 1]
-> ~"0x600025ce in ?? ()\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"0x600025ce in ?? ()\n"}]}
0x600025ce in ?? ()
-> *stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x600025ce",func="??",args=[],arch="arm"},thread-id="2",stopped-threads="all"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["reason","signal-received"],["signal-name","SIGTRAP"],["signal-meaning","Trace/breakpoint trap"],["frame",[["addr","0x600025ce"],["func","??"],["args",[]],["arch","arm"]]],["thread-id","2"],["stopped-threads","all"]]}]}
mi2.status = stopped
31-thread-list-ids
-> 31^done,thread-ids={thread-id="1",thread-id="2"},current-thread-id="2",number-of-threads="2"
GDB -> App: {"output":"","token":31,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["thread-ids",[["thread-id","1"],["thread-id","2"]]],["current-thread-id","2"],["number-of-threads","2"]]}}
32-thread-info 1
-> 32^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="main",args=[],file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",arch="armv7e-m"},state="stopped"}]
GDB -> App: {"output":"","token":32,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","main"],["args",[]],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["arch","armv7e-m"]]],["state","stopped"]]]]]}}
33-thread-info 2
-> 33^done,threads=[{id="2",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="??",args=[],arch="arm"},state="stopped"}]
GDB -> App: {"output":"","token":33,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","2"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","??"],["args",[]],["arch","arm"]]],["state","stopped"]]]]]}}
34-stack-list-frames --thread 2 0 19
-> 34^done,stack=[frame={level="0",addr="0x600025ce",func="??",arch="arm"}]
GDB -> App: {"output":"","token":34,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x600025ce"],["func","??"],["arch","arm"]]]]]]}}
35-thread-list-ids
-> 35^done,thread-ids={thread-id="1",thread-id="2"},current-thread-id="2",number-of-threads="2"
GDB -> App: {"output":"","token":35,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["thread-ids",[["thread-id","1"],["thread-id","2"]]],["current-thread-id","2"],["number-of-threads","2"]]}}
36-thread-info 1
-> 36^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="main",args=[],file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",arch="armv7e-m"},state="stopped"}]
GDB -> App: {"output":"","token":36,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","main"],["args",[]],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["arch","armv7e-m"]]],["state","stopped"]]]]]}}
37-thread-info 2
-> 37^done,threads=[{id="2",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="??",args=[],arch="arm"},state="stopped"}]
GDB -> App: {"output":"","token":37,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","2"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","??"],["args",[]],["arch","arm"]]],["state","stopped"]]]]]}}
38-exec-next --thread 1
-> 38^running
GDB -> App: {"output":"","token":38,"outOfBandRecord":[],"resultRecords":{"resultClass":"running","results":[]}}
-> *running,thread-id="1"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","1"]]}]}
mi2.status = running
-> *running,thread-id="2"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","2"]]}]}
mi2.status = running
-> ~"\nThread "
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\nThread "}]}

Thread
-> ~"2.1 received signal SIGTRAP, Trace/breakpoint trap.\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"2.1 received signal SIGTRAP, Trace/breakpoint trap.\n"}]}
2.1 received signal SIGTRAP, Trace/breakpoint trap.
-> ~"[Switching to Thread 1]\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"[Switching to Thread 1]\n"}]}
[Switching to Thread 1]
-> ~"0x600025ce in ?? ()\n"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"0x600025ce in ?? ()\n"}]}
0x600025ce in ?? ()
-> *stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x600025ce",func="??",args=[],arch="arm"},thread-id="2",stopped-threads="all"
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["reason","signal-received"],["signal-name","SIGTRAP"],["signal-meaning","Trace/breakpoint trap"],["frame",[["addr","0x600025ce"],["func","??"],["args",[]],["arch","arm"]]],["thread-id","2"],["stopped-threads","all"]]}]}
mi2.status = stopped
39-thread-list-ids
-> 39^done,thread-ids={thread-id="1",thread-id="2"},current-thread-id="2",number-of-threads="2"
GDB -> App: {"output":"","token":39,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["thread-ids",[["thread-id","1"],["thread-id","2"]]],["current-thread-id","2"],["number-of-threads","2"]]}}
40-thread-info 1
-> 40^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="main",args=[],file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",arch="armv7e-m"},state="stopped"}]
GDB -> App: {"output":"","token":40,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","main"],["args",[]],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["arch","armv7e-m"]]],["state","stopped"]]]]]}}
41-thread-info 2
-> 41^done,threads=[{id="2",target-id="Thread 1",frame={level="0",addr="0x600025ce",func="??",args=[],arch="arm"},state="stopped"}]
GDB -> App: {"output":"","token":41,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","2"],["target-id","Thread 1"],["frame",[["level","0"],["addr","0x600025ce"],["func","??"],["args",[]],["arch","arm"]]],["state","stopped"]]]]]}}
42-stack-list-frames --thread 2 0 19
-> 42^done,stack=[frame={level="0",addr="0x600025ce",func="??",arch="arm"}]
GDB -> App: {"output":"","token":42,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x600025ce"],["func","??"],["arch","arm"]]]]]]}}
43-stack-list-frames --thread 1 0 19
-> 43^done,stack=[frame={level="0",addr="0x600025ce",func="main",file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",arch="armv7e-m"}]
GDB -> App: {"output":"","token":43,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x600025ce"],["func","main"],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["arch","armv7e-m"]]]]]]}}
44-stack-info-frame --thread 1 --frame 0
-> 44^done,frame={level="0",addr="0x600025ce",func="main",file="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",fullname="/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c",line="39",arch="armv7e-m"}
GDB -> App: {"output":"","token":44,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["frame",[["level","0"],["addr","0x600025ce"],["func","main"],["file","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["fullname","/Users/twhiston/Code/zephyrproject/projects/workbenchblinkytest/src/main.c"],["line","39"],["arch","armv7e-m"]]]]}}
45-stack-list-variables --thread 1 --frame 0 --simple-values
-> 45^done,variables=[{name="ret",type="int",value="0"},{name="led_state",type="_Bool",value="true"}]
GDB -> App: {"output":"","token":45,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["variables",[[["name","ret"],["type","int"],["value","0"]],[["name","led_state"],["type","_Bool"],["value","true"]]]]]}}
46-var-create --thread 1 --frame 0 var_ret_4096 @ "ret"
-> 46^done,name="var_ret_4096",numchild="0",value="0",type="int",has_more="0"
GDB -> App: {"output":"","token":46,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","var_ret_4096"],["numchild","0"],["value","0"],["type","int"],["has_more","0"]]}}
47-var-create --thread 1 --frame 0 var_led_state_4096 @ "led_state"
-> 47^done,name="var_led_state_4096",numchild="0",value="true",type="_Bool",has_more="0"
GDB -> App: {"output":"","token":47,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","var_led_state_4096"],["numchild","0"],["value","true"],["type","_Bool"],["has_more","0"]]}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions