You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/21 10:27:11 UTC

[nuttx] branch master updated (0d39246b4e -> 6168bdf9e0)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from 0d39246b4e sim/posix: Add the host_system interface used to execute the host command
     new f3208c1def tools: add type information
     new 8c56354dc8 minidumpserver: add arm-a thumb arch support
     new ffb391f6aa minidumpserver.py:Print the line number of logfile when the format is wrong
     new 9241e4a2ca minidumpserver.py:support xtensa and esp32s3 arch
     new 6168bdf9e0 minidumpserver: Add usage documentation

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Documentation/guides/minidumpserver.rst | 113 +++++++++++++
 tools/minidumpserver.py                 | 274 +++++++++++++++++++++-----------
 2 files changed, 294 insertions(+), 93 deletions(-)
 create mode 100644 Documentation/guides/minidumpserver.rst


[nuttx] 05/05: minidumpserver: Add usage documentation

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 6168bdf9e010eef9ca715389d40effb7840af5d4
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Mon Aug 21 14:38:20 2023 +0800

    minidumpserver: Add usage documentation
    
    Signed-off-by: anjiahao <an...@xiaomi.com>
---
 Documentation/guides/minidumpserver.rst | 113 ++++++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)

diff --git a/Documentation/guides/minidumpserver.rst b/Documentation/guides/minidumpserver.rst
new file mode 100644
index 0000000000..4ad7cfee3a
--- /dev/null
+++ b/Documentation/guides/minidumpserver.rst
@@ -0,0 +1,113 @@
+==============
+minidumpserver
+==============
+
+Introduction
+============
+
+This tool can utilize a crash log on a PC to simulate a set of GDB server functionalities,
+enabling the use of GDB to debug the context of a NuttX crash.
+The script directory is located in `tools/minidumpserver.py`.
+
+Usage
+=====
+
+We can use `-h` to get help information:
+```bash
+$usage: minidumpserver.py [-h] -e ELFFILE -l LOGFILE [-a {arm,arm-a,arm-t,riscv,esp32s3,xtensa}] [-p PORT] [--debug]
+
+options:
+  -h, --help            show this help message and exit
+  -e ELFFILE, --elffile ELFFILE
+                        elffile
+  -l LOGFILE, --logfile LOGFILE
+                        logfile
+  -a {arm,arm-a,arm-t,riscv,esp32s3,xtensa}, --arch {arm,arm-a,arm-t,riscv,esp32s3,xtensa}
+                        select architecture,if not use this options, The architecture will be inferred from the logfile
+  -p PORT, --port PORT  gdbport
+  --debug
+```
+
+Example
+=======
+1. Use ./tools/configure.sh esp32s3-devkit:nsh and disable `CONFIG_NSH_DISABLE_MW`.
+2. `make -j`
+3. Flash image to esp32s3-devkit.
+4. Run `minicom -D /dev/ttyUSB0 -b 115200` and reset esp32s3-devkit.
+5. Use `mw -1` on nsh to trigger a crash.
+6. Get the crash log from minicom and save it to `crash.log`.
+```
+up_dump_register:    PC: 42009cd8    PS: 00060820
+up_dump_register:    A0: 82007d71    A1: 3fc8b6d0    A2: 3fc8b8e0    A3: 00000000
+up_dump_register:    A4: ffffffff    A5: 00000000    A6: 00000001    A7: 00000000
+up_dump_register:    A8: ffffffff    A9: 3fc8b690   A10: ffffffff   A11: 00000000
+up_dump_register:   A12: 0000002d   A13: 0000002d   A14: 3fc8bb6d   A15: 0fffffff
+up_dump_register:   SAR: 00000000 CAUSE: 0000001c VADDR: ffffffff
+up_dump_register:  LBEG: 40055499  LEND: 400554a9  LCNT: fffffffc
+dump_stack: User Stack:
+dump_stack:   base: 0x3fc8b0e0
+dump_stack:   size: 00002000
+dump_stack:     sp: 0x3fc8b6d0
+stack_dump: 0x3fc8b6c0: 82007770 3fc8b700 3fc8b8e0 00000002 ffffffff 3fc89f54 00060e20 00000000
+stack_dump: 0x3fc8b6e0: 3fc8b8e0 3fc8b778 00000000 3fc8b750 82007850 3fc8b720 3fc8b8e0 00000002
+stack_dump: 0x3fc8b700: 3fc8b720 42009c84 3fc8bb68 3fc8b8e0 82006b04 3fc8b7d0 3fc8b8e0 3fc8bb68
+stack_dump: 0x3fc8b720: 3fc8bb68 3fc8bb6b 00000000 00000000 00000000 00000000 00000000 00000000
+stack_dump: 0x3fc8b740: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+stack_dump: 0x3fc8b760: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fc8bb69
+stack_dump: 0x3fc8b780: 82006ad5 00000000 00000000 00000040 00000040 3fc8bb6e 3fc8adf8 0000002c
+stack_dump: 0x3fc8b7a0: ffffffff 00000005 00000000 00000000 3fc8bae0 00000000 00000000 00000000
+stack_dump: 0x3fc8b7c0: 820068a2 3fc8b800 3fc8b8e0 3c020837 00000001 3fc8b800 3fc8b8e0 3c020837
+stack_dump: 0x3fc8b7e0: 0000000a 3fc8bae0 00000001 3fc8bb68 82006865 3fc8b820 00000001 3fc8b0c0
+stack_dump: 0x3fc8b800: 00000001 3fc8bb68 00000000 3fc8ae1c 82003618 3fc8b840 00000001 3fc8b0c0
+stack_dump: 0x3fc8b820: 3fc8b8e0 00000000 00000000 00000000 820019dc 3fc8b870 42006834 00000001
+stack_dump: 0x3fc8b840: 00000064 00000000 00000000 00000000 3c0225d8 3fc89590 00000000 3fc880cc
+stack_dump: 0x3fc8b860: 00000000 3fc8b890 00000000 00000000 3fc8b0c0 00000002 00000000 3fc8ad98
+stack_dump: 0x3fc8b880: 00000000 3fc8b8b0 00000000 00000000 00000000 00000000 00000000 00000000
+```
+7. Run `./tools/minidumpserver.py -e nuttx -l crash.log -p 1234 -a esp32s3`
+8. Run `xtensa-esp32s3-elf-gdb nuttx -ex "target remote 127.0.0.1:1234"`
+
+```bash
+GNU gdb (esp-gdb) 12.1_20221002
+Copyright (C) 2022 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=x86_64-linux-gnu --target=xtensa-esp-elf".
+Type "show configuration" for configuration details.
+For bug reporting instructions, please see:
+<https://www.gnu.org/software/gdb/bugs/>.
+Find the GDB manual and other documentation resources online at:
+    <http://www.gnu.org/software/gdb/documentation/>.
+
+For help, type "help".
+Type "apropos word" to search for commands related to "word"...
+Reading symbols from nuttx...
+Remote debugging using 127.0.0.1:1234
+0x42009cd8 in cmd_mw (vtbl=0x3fc8b8e0, argc=<optimized out>, argv=<optimized out>) at nsh_dbgcmds.c:259
+259               nsh_output(vtbl, "  %p = 0x%08" PRIx32, ptr, *ptr);
+(gdb) bt
+#0  0x42009cd8 in cmd_mw (vtbl=0x3fc8b8e0, argc=<optimized out>, argv=<optimized out>) at nsh_dbgcmds.c:259
+#1  0x42007d71 in nsh_command (vtbl=0x3fc8b8e0, argc=2, argv=0x3fc8b720) at nsh_command.c:1154
+#2  0x42007770 in nsh_execute (oflags=<optimized out>, redirfile=0x0, argv=0x3fc8b720, argc=2, vtbl=0x3fc8b8e0)
+    at nsh_parse.c:845
+#3  nsh_parse_command (vtbl=0x3fc8b8e0, cmdline=<optimized out>) at nsh_parse.c:2744
+#4  0x42007850 in nsh_parse (vtbl=0x3fc8b8e0,
+    cmdline=0x3fc8bb68 <error: Cannot access memory at address 0x3fc8bb68>) at nsh_parse.c:2828
+#5  0x42006b04 in nsh_session (pstate=0x3fc8b8e0, login=<optimized out>, argc=1, argv=<optimized out>)
+    at nsh_session.c:245
+#6  0x420068a2 in nsh_consolemain (argc=1, argv=0x3fc8b0c0) at nsh_consolemain.c:71
+#7  0x42006865 in nsh_main (argc=1, argv=0x3fc8b0c0) at nsh_main.c:74
+#8  0x42003618 in nxtask_startup (entrypt=0x42006834 <nsh_main>, argc=1, argv=0x3fc8b0c0)
+    at sched/task_startup.c:70
+#9  0x420019dc in nxtask_start () at task/task_start.c:134
+(gdb)
+````
+
+How to add new architecture
+===========================
+
+The main objective is to establish the sequence of registers in GDB,
+aligning the register names in the crash log with the order of registers in GDB.
+This alignment will facilitate the creation of a new architecture's GDB server.


[nuttx] 01/05: tools: add type information

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit f3208c1def2eac90c55d131b641281f458b01895
Author: renweibo <re...@xiaomi.com>
AuthorDate: Mon Apr 10 11:04:55 2023 +0800

    tools: add type information
    
    Additional information here:
    - no code logic change, just add type hint
    - make the code easy to work with
    - minor python3 requirement without any complex type feature
    
    Signed-off-by: renweibo <re...@xiaomi.com>
---
 tools/minidumpserver.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py
index 0f08883945..776646561c 100755
--- a/tools/minidumpserver.py
+++ b/tools/minidumpserver.py
@@ -48,7 +48,7 @@ class dump_elf_file:
     and can be retrieved from the ELF file.
     """
 
-    def __init__(self, elffile):
+    def __init__(self, elffile: str):
         self.elffile = elffile
         self.fd = None
         self.elf = None
@@ -210,7 +210,7 @@ reg_table = {
 
 
 class dump_log_file:
-    def __init__(self, logfile):
+    def __init__(self, logfile: str):
         self.logfile = logfile
         self.fd = None
         self.arch = ""
@@ -311,7 +311,7 @@ GDB_SIGNAL_DEFAULT = 7
 
 
 class gdb_stub:
-    def __init__(self, logfile, elffile):
+    def __init__(self, logfile: dump_log_file, elffile: dump_elf_file):
         self.logfile = logfile
         self.elffile = elffile
         self.socket = None
@@ -470,7 +470,7 @@ class gdb_stub:
     def handle_general_query_packet(self, pkt):
         self.put_gdb_packet(b"")
 
-    def run(self, socket):
+    def run(self, socket: socket.socket):
         self.socket = socket
 
         while True:


[nuttx] 03/05: minidumpserver.py:Print the line number of logfile when the format is wrong

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ffb391f6aa18ebe8188fb6eaea2fa9186bc45b0a
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Wed Jul 5 15:38:40 2023 +0800

    minidumpserver.py:Print the line number of logfile when the format is wrong
    
    Signed-off-by: anjiahao <an...@xiaomi.com>
---
 tools/minidumpserver.py | 135 +++++++++++++++++++++++++-----------------------
 1 file changed, 71 insertions(+), 64 deletions(-)

diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py
index b8f9442c8b..67638f9cbe 100755
--- a/tools/minidumpserver.py
+++ b/tools/minidumpserver.py
@@ -247,79 +247,86 @@ class dump_log_file:
         start = 0
         if self.fd is None:
             self.open()
-        while 1:
-            line = self.fd.readline()
-            if line == "":
-                break
 
-            tmp = re.search("up_dump_register:", line)
-            if tmp is not None:
-                # find arch
-                if arch is None:
-                    self.arch = tmp.group(1)
-                else:
-                    self.arch = arch
-
-                if self.arch not in reg_table:
-                    logger.error("%s not supported" % (self.arch))
-                # init register list
-                if len(self.registers) == 0:
-                    for x in range(max(reg_table[self.arch].values()) + 1):
-                        self.registers.append(b"x")
-
-                # find register value
-                line = line[tmp.span()[1] :]
-                line = line.replace("\n", " ")
-                while 1:
-                    tmp = re.search("([^ ]+):", line)
-                    if tmp is None:
-                        break
-                    register = tmp.group(1)
-                    line = line[tmp.span()[1] :]
-                    tmp = re.search("([0-9a-fA-F]+) ", line)
-                    if tmp is None:
-                        break
-                    if register in reg_table[self.arch].keys():
-                        self.registers[reg_table[self.arch][register]] = int(
-                            "0x" + tmp.group().replace(" ", ""), 16
-                        )
-                    line = line[tmp.span()[1] :]
-                continue
+        linenumber = 0
+        try:
+            while 1:
+                line = self.fd.readline()
+                if line == "":
+                    break
 
-            tmp = re.search("stack_dump:", line)
-            if tmp is not None:
-                # find stackdump
-                line = line[tmp.span()[1] :]
-                tmp = re.search("([0-9a-fA-F]+):", line)
+                linenumber += 1
+                tmp = re.search("up_dump_register:", line)
                 if tmp is not None:
-                    line_start = int("0x" + tmp.group()[:-1], 16)
-
-                    if start + len(data) != line_start:
-                        # stack is not contiguous
-                        if len(data) == 0:
-                            start = line_start
-                        else:
-                            memory = {
-                                "start": start,
-                                "end": start + len(data),
-                                "data": data,
-                            }
-                            self.memories.append(memory)
-                            data = b""
-                            start = line_start
-
+                    # find arch
+                    if arch is None:
+                        self.arch = tmp.group(1)
+                    else:
+                        self.arch = arch
+
+                    if self.arch not in reg_table:
+                        logger.error("%s not supported" % (self.arch))
+                    # init register list
+                    if len(self.registers) == 0:
+                        for x in range(max(reg_table[self.arch].values()) + 1):
+                            self.registers.append(b"x")
+
+                    # find register value
                     line = line[tmp.span()[1] :]
                     line = line.replace("\n", " ")
-
                     while 1:
-                        # record stack value
-                        tmp = re.search(" ([0-9a-fA-F]+)", line)
+                        tmp = re.search("([^ ]+):", line)
+                        if tmp is None:
+                            break
+                        register = tmp.group(1)
+                        line = line[tmp.span()[1] :]
+                        tmp = re.search("([0-9a-fA-F]+) ", line)
                         if tmp is None:
                             break
-                        data = data + struct.pack(
-                            "<I", int("0x" + tmp.group().replace(" ", ""), 16)
-                        )
+                        if register in reg_table[self.arch].keys():
+                            self.registers[reg_table[self.arch][register]] = int(
+                                "0x" + tmp.group().replace(" ", ""), 16
+                            )
+                        line = line[tmp.span()[1] :]
+                    continue
+
+                tmp = re.search("stack_dump:", line)
+                if tmp is not None:
+                    # find stackdump
+                    line = line[tmp.span()[1] :]
+                    tmp = re.search("([0-9a-fA-F]+):", line)
+                    if tmp is not None:
+                        line_start = int("0x" + tmp.group()[:-1], 16)
+
+                        if start + len(data) != line_start:
+                            # stack is not contiguous
+                            if len(data) == 0:
+                                start = line_start
+                            else:
+                                memory = {
+                                    "start": start,
+                                    "end": start + len(data),
+                                    "data": data,
+                                }
+                                self.memories.append(memory)
+                                data = b""
+                                start = line_start
+
                         line = line[tmp.span()[1] :]
+                        line = line.replace("\n", " ")
+
+                        while 1:
+                            # record stack value
+                            tmp = re.search(" ([0-9a-fA-F]+)", line)
+                            if tmp is None:
+                                break
+                            data = data + struct.pack(
+                                "<I", int("0x" + tmp.group().replace(" ", ""), 16)
+                            )
+                            line = line[tmp.span()[1] :]
+        except Exception as e:
+            logger.error("parse log file error: %s linenumber %d" % (e, linenumber))
+            os._exit(0)
 
         if len(data):
             memory = {"start": start, "end": start + len(data), "data": data}


[nuttx] 04/05: minidumpserver.py:support xtensa and esp32s3 arch

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 9241e4a2ca8c0c7a1d2a17f03e1bd88e7a025a2f
Author: anjiahao <an...@xiaomi.com>
AuthorDate: Fri Aug 18 18:14:12 2023 +0800

    minidumpserver.py:support xtensa and esp32s3 arch
    
    Signed-off-by: anjiahao <an...@xiaomi.com>
---
 tools/minidumpserver.py | 112 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 87 insertions(+), 25 deletions(-)

diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py
index 67638f9cbe..d711d445c0 100755
--- a/tools/minidumpserver.py
+++ b/tools/minidumpserver.py
@@ -203,27 +203,79 @@ reg_table = {
         "T6": 31,
         "PC": 32,
     },
-    "xtensa": {
+    # use xtensa-esp32s3-elf-gdb register table
+    "esp32s3": {
         "PC": 0,
-        "SAR": 68,
         "PS": 73,
-        "SCOM": 29,
-        "A0": 21,
-        "A1": 22,
-        "A2": 23,
-        "A3": 24,
-        "A4": 25,
-        "A5": 26,
-        "A6": 27,
-        "A7": 28,
-        "A8": 29,
-        "A9": 30,
-        "A10": 31,
-        "A11": 32,
-        "A12": 33,
-        "A13": 34,
-        "A14": 35,
-        "A15": 36,
+        "A0": 1,
+        "A1": 2,
+        "A2": 3,
+        "A3": 4,
+        "A4": 5,
+        "A5": 6,
+        "A6": 7,
+        "A7": 8,
+        "A8": 9,
+        "A9": 10,
+        "A10": 11,
+        "A11": 12,
+        "A12": 13,
+        "A13": 14,
+        "A14": 15,
+        "A15": 16,
+        "WINDOWBASE": 69,
+        "WINDOWSTART": 70,
+        "CAUSE": 190,
+        "VADDR": 196,
+        "LBEG": 65,
+        "LEND": 66,
+        "LCNT": 67,
+        "SAR": 68,
+        "SCOM": 76,
+    },
+    # use xt-gdb register table
+    "xtensa": {
+        "PC": 32,
+        "PS": 742,
+        "A0": 256,
+        "A1": 257,
+        "A2": 258,
+        "A3": 259,
+        "A4": 260,
+        "A5": 261,
+        "A6": 262,
+        "A7": 263,
+        "A8": 264,
+        "A9": 265,
+        "A10": 266,
+        "A11": 267,
+        "A12": 268,
+        "A13": 269,
+        "A14": 270,
+        "A15": 271,
+        "WINDOWBASE": 584,
+        "WINDOWSTART": 585,
+        "CAUSE": 744,
+        "VADDR": 750,
+        "LBEG": 512,
+        "LEND": 513,
+        "LCNT": 514,
+        "SAR": 515,
+        "SCOM": 524,
+    },
+}
+
+# make sure the a0-a15 can be remapped to the correct register
+reg_fix_value = {
+    "esp32s3": {
+        "WINDOWBASE": 0,
+        "WINDOWSTART": 1,
+        "PS": 0x40000,
+    },
+    "xtensa": {
+        "WINDOWBASE": 0,
+        "WINDOWSTART": 1,
+        "PS": 0x40000,
     },
 }
 
@@ -290,6 +342,12 @@ class dump_log_file:
                         line = line[tmp.span()[1] :]
                     continue
 
+                if self.arch in reg_fix_value:
+                    for register in reg_fix_value[self.arch].keys():
+                        self.registers[reg_table[self.arch][register]] = reg_fix_value[
+                            self.arch
+                        ][register]
+
                 tmp = re.search("stack_dump:", line)
                 if tmp is not None:
                     # find stackdump
@@ -427,11 +485,15 @@ class gdb_stub:
         self.put_gdb_packet(pkt)
 
     def handle_register_single_read_packet(self, pkt):
-        # Mark registers as "<unavailable>".
-        # 'p' packets are usually used for registers
-        # other than the general ones (e.g. eax, ebx)
-        # so we can safely reply "xxxxxxxx" here.
-        self.put_gdb_packet(b"x" * 8)
+        reg_fmt = "<I"
+        logger.debug(f"pkt: {pkt}")
+
+        reg = int("0x" + pkt[1:].decode("utf8"), 16)
+        if reg < len(self.logfile.registers) and self.logfile.registers[reg] != b"x":
+            bval = struct.pack(reg_fmt, self.logfile.registers[reg])
+            self.put_gdb_packet(binascii.hexlify(bval))
+        else:
+            self.put_gdb_packet(b"x" * 8)
 
     def handle_register_group_write_packet(self):
         # the 'G' packet for writing to a group of registers
@@ -546,7 +608,7 @@ if __name__ == "__main__":
         "--arch",
         help="select architecture,if not use this options,\
                         The architecture will be inferred from the logfile",
-        choices=['arm', 'arm-a', 'arm-t', 'riscv', 'xtensa']
+        choices=[arch for arch in reg_table.keys()],
     )
 
     parser.add_argument("-p", "--port", help="gdbport", type=int, default=1234)


[nuttx] 02/05: minidumpserver: add arm-a thumb arch support

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8c56354dc80f34eba2392194dfc0ae3bfa017633
Author: wangbowen6 <wa...@xiaomi.com>
AuthorDate: Wed May 24 16:51:16 2023 +0800

    minidumpserver: add arm-a thumb arch support
    
    The frame pointer and r11 register is different in thumb mode and
    arm mode.
    
    Signed-off-by: wangbowen6 <wa...@xiaomi.com>
---
 tools/minidumpserver.py | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/tools/minidumpserver.py b/tools/minidumpserver.py
index 776646561c..b8f9442c8b 100755
--- a/tools/minidumpserver.py
+++ b/tools/minidumpserver.py
@@ -149,6 +149,25 @@ reg_table = {
         "PC": 15,
         "CPSR": 41,
     },
+    "arm-t": {
+        "R0": 0,
+        "R1": 1,
+        "R2": 2,
+        "R3": 3,
+        "R4": 4,
+        "R5": 5,
+        "R6": 6,
+        "FP": 7,
+        "R8": 8,
+        "SB": 9,
+        "SL": 10,
+        "R11": 11,
+        "IP": 12,
+        "SP": 13,
+        "LR": 14,
+        "PC": 15,
+        "CPSR": 41,
+    },
     "riscv": {
         "ZERO": 0,
         "RA": 1,
@@ -520,7 +539,7 @@ if __name__ == "__main__":
         "--arch",
         help="select architecture,if not use this options,\
                         The architecture will be inferred from the logfile",
-        choices=['arm', 'arm-a', 'riscv', 'xtensa'],
+        choices=['arm', 'arm-a', 'arm-t', 'riscv', 'xtensa']
     )
 
     parser.add_argument("-p", "--port", help="gdbport", type=int, default=1234)