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 2025/02/02 06:02:31 UTC

(nuttx) branch master updated (08fe636001 -> 698b2e00e6)

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 08fe636001 xtensa/esp32[s2|c3|c6|h2]: fix sched_[lock|unlock] boot crash
     new 50fb43e23b tools: rename tools/gdb/nuttxgdb to tools/pynuttx/nxgdb
     new 14cc23f42a nxgdb: add missing protocols definitions
     new 698b2e00e6 nxgdb: include all files to package

The 3 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:
 tools/gdb/.gitignore                               |   2 -
 tools/pynuttx/.gitignore                           |   2 +
 tools/{gdb => pynuttx}/gdbinit.py                  |   8 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/__init__.py  |   4 +-
 tools/pynuttx/nxgdb/circbuf.py                     | 195 +++++++++++++++++++++
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/debug.py     |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/diagnose.py  |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/dmesg.py     |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/fs.py        |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/gcore.py     |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/lists.py     |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/macros.py    |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memcheck.py  |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memdump.py   |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memleak.py   |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/mm.py        |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/net.py       |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/prefix.py    |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/profile.py   |   2 +-
 .../wdog.py => pynuttx/nxgdb/protocols/circbuf.py} |  16 +-
 .../nuttxgdb => pynuttx/nxgdb}/protocols/fs.py     |   4 +-
 .../nuttxgdb => pynuttx/nxgdb}/protocols/mm.py     |   2 +
 .../nuttxgdb => pynuttx/nxgdb}/protocols/thread.py |   4 +-
 tools/pynuttx/nxgdb/protocols/uorb.py              | 103 +++++++++++
 .../nuttxgdb => pynuttx/nxgdb}/protocols/value.py  |   4 +-
 .../nuttxgdb => pynuttx/nxgdb}/protocols/wdog.py   |   2 +-
 .../nuttxgdb => pynuttx/nxgdb}/protocols/wqueue.py |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/rpmsg.py     |   4 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/stack.py     |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/thread.py    |   2 +-
 tools/pynuttx/nxgdb/uorb.py                        | 158 +++++++++++++++++
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/utils.py     |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wdog.py      |   2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wqueue.py    |   2 +-
 tools/{gdb => pynuttx}/pyproject.toml              |   7 +-
 tools/{gdb => pynuttx}/requirements.txt            |   0
 36 files changed, 521 insertions(+), 44 deletions(-)
 delete mode 100644 tools/gdb/.gitignore
 create mode 100644 tools/pynuttx/.gitignore
 rename tools/{gdb => pynuttx}/gdbinit.py (90%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/__init__.py (96%)
 create mode 100644 tools/pynuttx/nxgdb/circbuf.py
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/debug.py (96%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/diagnose.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/dmesg.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/fs.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/gcore.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/lists.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/macros.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memcheck.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memdump.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memleak.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/mm.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/net.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/prefix.py (97%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/profile.py (98%)
 copy tools/{gdb/nuttxgdb/protocols/wdog.py => pynuttx/nxgdb/protocols/circbuf.py} (85%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/fs.py (95%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/mm.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/thread.py (97%)
 create mode 100644 tools/pynuttx/nxgdb/protocols/uorb.py
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/value.py (96%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/wdog.py (96%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/wqueue.py (97%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/rpmsg.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/stack.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/thread.py (99%)
 create mode 100644 tools/pynuttx/nxgdb/uorb.py
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/utils.py (99%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wdog.py (98%)
 rename tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wqueue.py (99%)
 rename tools/{gdb => pynuttx}/pyproject.toml (86%)
 rename tools/{gdb => pynuttx}/requirements.txt (100%)


(nuttx) 02/03: nxgdb: add missing protocols definitions

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 14cc23f42a3bdc64e10088beb49d07449eace022
Author: xuxingliang <xu...@xiaomi.com>
AuthorDate: Tue Nov 26 14:09:49 2024 +0800

    nxgdb: add missing protocols definitions
    
    Signed-off-by: xuxingliang <xu...@xiaomi.com>
---
 tools/pynuttx/nxgdb/circbuf.py           | 195 +++++++++++++++++++++++++++++++
 tools/pynuttx/nxgdb/protocols/circbuf.py |  35 ++++++
 tools/pynuttx/nxgdb/protocols/uorb.py    | 103 ++++++++++++++++
 tools/pynuttx/nxgdb/uorb.py              | 158 +++++++++++++++++++++++++
 4 files changed, 491 insertions(+)

diff --git a/tools/pynuttx/nxgdb/circbuf.py b/tools/pynuttx/nxgdb/circbuf.py
new file mode 100644
index 0000000000..3f0750ba4a
--- /dev/null
+++ b/tools/pynuttx/nxgdb/circbuf.py
@@ -0,0 +1,195 @@
+############################################################################
+# tools/pynuttx/nxgdb/circbuf.py
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+import argparse
+from typing import Generator
+
+import gdb
+
+from . import utils
+from .protocols import circbuf as p
+
+
+class CircBuf(utils.Value, p.CircBuf):
+    def __init__(
+        self, obj: gdb.Value | utils.Value, datatype: gdb.Type | None = None
+    ) -> None:
+        circbuf_s = utils.lookup_type("struct circbuf_s")
+        if obj.type.code == gdb.TYPE_CODE_INT:
+            obj = obj.cast(circbuf_s.pointer())
+
+        if obj.type.code == gdb.TYPE_CODE_PTR:
+            obj.cast(circbuf_s.pointer())
+            obj = obj.dereference()
+
+        super().__init__(obj)
+
+        # datatype must not be a pointer, because we are going to construct value from memory
+        if not datatype:
+            datatype = utils.lookup_type("char")
+
+        if isinstance(datatype, str):
+            datatype = utils.lookup_type(datatype)
+
+        if datatype.code == gdb.TYPE_CODE_PTR:
+            datatype = datatype.target()
+
+        self.datatype = datatype
+
+    def __str__(self) -> str:
+        return (
+            f"(struct circbuf_s *){hex(self.address)} base: {self.base} "
+            f"size: {self.size} head: {self.head} tail: {self.tail}"
+        )
+
+    @property
+    def size(self) -> int:
+        return int(self["size"])
+
+    @property
+    def used(self) -> int:
+        return int(self["head"]) - int(self["tail"])
+
+    @property
+    def space(self) -> int:
+        return self.size - self.used
+
+    @property
+    def is_inited(self) -> bool:
+        return bool(self["base"])
+
+    @property
+    def is_empty(self) -> bool:
+        return self.used == 0
+
+    @property
+    def is_full(self) -> bool:
+        return not self.space
+
+    def _peekat(self, pos, len) -> memoryview:
+        if len > self.size:
+            return None
+
+        pos = pos % self.size
+        total = len
+        if pos + len > self.size:
+            len = self.size - pos
+
+        memory = gdb.selected_inferior().read_memory(self.base + pos, len)
+        if len < total:
+            memory += gdb.selected_inferior().read_memory(self.base, total - len)
+        return memory
+
+    @property
+    def history(self) -> Generator[utils.Value, None, None]:
+        """Iterate over the history data in the circbuf_s, from oldest to newest"""
+        if not self.base or not self.size:
+            # Uninitialized buffer
+            return []
+
+        head = int(self.head)
+        size = int(self.size)
+        sizeof = self.datatype.sizeof
+
+        if head < size:
+            # The buffer is never wrapped, read from the beginning
+            offset = 0
+            end = head
+        else:
+            # The buffer is wrapped, read from the head
+            offset = head % size
+            end = offset + size
+
+        while offset < end:
+            memory = self._peekat(offset, sizeof)
+            value = gdb.Value(memory, self.datatype)
+            yield value
+            offset += sizeof
+
+    @property
+    def unread(self) -> Generator[utils.Value, None, None]:
+        """Return all unread data in circle buffer"""
+        if not self.base or not self.size:
+            return []
+
+        # Read from tail towards head for all data.
+        tail = int(self.tail)
+        head = int(self.head)
+        sizeof = self.datatype.sizeof
+        offset = tail
+        while offset < head:
+            memory = self._peekat(offset, sizeof)
+            yield gdb.Value(memory, self.datatype)
+            offset += sizeof
+
+
+class CircBufInfo(gdb.Command):
+    """Print circbuf_s information"""
+
+    def __init__(self):
+        super().__init__("circbuf", gdb.COMMAND_USER)
+
+    def invoke(self, arg: str, from_tty: bool) -> None:
+        parser = argparse.ArgumentParser(description="Dump circle buffer information")
+        parser.add_argument(
+            "--type",
+            type=str,
+            help="The data type the circbuf_s contains",
+            default=None,
+        )
+        parser.add_argument(
+            "--history",
+            action="store_true",
+            help="Dump the history data in the circbuf_s",
+        )
+        parser.add_argument(
+            "--unread",
+            action="store_true",
+            help="Dump the unread data in the circbuf_s",
+        )
+        parser.add_argument(
+            "address",
+            type=str,
+            help="The address of the circubuf_s",
+        )
+
+        try:
+            args = parser.parse_args(gdb.string_to_argv(arg))
+        except SystemExit:
+            gdb.write("Invalid arguments\n")
+            return
+
+        entry = utils.parse_and_eval(args.address)
+        circbuf = CircBuf(entry, datatype=args.type)
+
+        print(circbuf)  # Dump buffer basic information
+
+        if args.history:
+            dumpdata = circbuf.history
+        elif args.unread:
+            dumpdata = circbuf.unread
+        else:
+            dumpdata = []
+
+        print(f"Dumping data with type {args.type}")
+        for i, data in enumerate(dumpdata):
+            print(f"{i}: {data.format_string(styling=True)}")
diff --git a/tools/pynuttx/nxgdb/protocols/circbuf.py b/tools/pynuttx/nxgdb/protocols/circbuf.py
new file mode 100644
index 0000000000..85b3b68819
--- /dev/null
+++ b/tools/pynuttx/nxgdb/protocols/circbuf.py
@@ -0,0 +1,35 @@
+############################################################################
+# tools/pynuttx/nxgdb/protocols/circbuf.py
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+from __future__ import annotations
+
+from .value import Value
+
+
+class CircBuf(Value):
+    """struct circbuf_s"""
+
+    base: Value
+    size: Value
+    head: Value
+    tail: Value
+    external: Value
diff --git a/tools/pynuttx/nxgdb/protocols/uorb.py b/tools/pynuttx/nxgdb/protocols/uorb.py
new file mode 100644
index 0000000000..49740a6e7e
--- /dev/null
+++ b/tools/pynuttx/nxgdb/protocols/uorb.py
@@ -0,0 +1,103 @@
+############################################################################
+# tools/pynuttx/nxgdb/protocols/uorb.py
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+from __future__ import annotations
+
+from .value import Value
+
+
+class OrbMetadata(Value):
+    """struct orb_metadata_s"""
+
+    o_name: Value
+    o_size: Value
+    o_format: Value
+
+
+class SensorMeta(Value):
+    """struct sensor_meta_s"""
+
+    esize: Value
+    name: Value
+
+
+class SensorState(Value):
+    """struct sensor_state_s"""
+
+    esize: Value
+    nbuffer: Value
+    min_latency: Value
+    min_interval: Value
+    nsubscribers: Value
+    nadvertisers: Value
+    generation: Value
+    priv: Value
+
+
+class SensorUState(Value):
+    """struct sensor_ustate_s"""
+
+    esize: Value
+    latency: Value
+    interval: Value
+    generation: Value
+
+
+class SensorUpper(Value):
+    """struct sensor_upperhalf_s"""
+
+    lower: Value
+    state: SensorState
+    timing: Value
+    buffer: Value
+    lock: Value
+    userlist: Value
+
+
+class SensorLower(Value):
+    """struct sensor_lowerhalf_s"""
+
+    type: Value
+    nbuffer: Value
+    uncalibrated: Value
+    ops: Value
+    push_event: Value
+    notify_event: Value
+
+    sensor_lock: Value
+    sensor_unlock: Value
+    priv: Value
+    persist: Value
+
+
+class SensorUser(Value):
+    """struct sensor_user_s"""
+
+    node: Value
+    fds: Value
+    role: Value
+    changed: Value
+    event: Value
+    flushing: Value
+    buffersem: Value
+    bufferpos: Value
+    state: SensorUState
diff --git a/tools/pynuttx/nxgdb/uorb.py b/tools/pynuttx/nxgdb/uorb.py
new file mode 100644
index 0000000000..3e0c611edb
--- /dev/null
+++ b/tools/pynuttx/nxgdb/uorb.py
@@ -0,0 +1,158 @@
+############################################################################
+# tools/pynuttx/nxgdb/uorb.py
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+from __future__ import annotations
+
+import argparse
+import re
+from typing import List
+
+import gdb
+
+from . import fs, utils
+from .circbuf import CircBuf
+from .protocols import uorb as p
+
+
+class Sensor(utils.Value, p.SensorUpper):
+    """struct sensor_upperhalf_s and enhancement"""
+
+    inode_s = utils.lookup_type("struct inode")
+    sensor_upperhalf_s = utils.lookup_type("struct sensor_upperhalf_s")
+
+    def __init__(self, inode: gdb.Value | utils.Value, path=None):
+        # inode must be type of struct inode *
+        if inode.type.code != gdb.TYPE_CODE_PTR:
+            raise ValueError(f"Expect pointer type, got {inode.type}")
+
+        super().__init__(inode["i_private"].cast(self.sensor_upperhalf_s.pointer()))
+        self.inode = inode
+        self._path = path
+
+    def __repr__(self) -> str:
+        state = self.state
+        return f"{hex(self)} {self.topicname} {state.nsubscribers} subscribers, {state.nadvertisers} advertisers"
+
+    def details(self) -> str:
+        state = self.state
+        return f"nbuffer: {state.nbuffer}, latency: {state.min_latency}, interval: {state.min_interval}"
+
+    def __str__(self) -> str:
+        return self.__repr__()
+
+    @property
+    def path(self):
+        return self._path or fs.inode_getpath(self.inode)
+
+    @property
+    def nsubscribers(self) -> int:
+        return int(self.state["nsubscribers"])
+
+    @property
+    def nadvertisers(self) -> int:
+        return int(self.state["nadvertisers"])
+
+    @property
+    def topicname(self):
+        name = self.path.split("/")[-1]
+        name = re.sub(r"(\d$)", "", name)
+        name = re.sub(r"(_uncal$)", "", name)
+        return name
+
+    @property
+    def metadata(self) -> p.OrbMetadata:
+        return utils.gdb_eval_or_none(f"g_orb_{self.topicname}")
+
+    @property
+    def datatype(self) -> gdb.Type:
+        """Return the datatype of the topic like struct sensor_accel"""
+        return utils.lookup_type(f"struct {self.topicname}")
+
+    @property
+    def circbuf(self) -> CircBuf:
+        if not self.datatype:
+            return None
+        return CircBuf(self.buffer, datatype=self.datatype.pointer())
+
+
+def get_topic_inodes(topic: str = None) -> List[fs.Inode]:
+    nodes = (
+        (node, path)
+        for node, path in fs.foreach_inode()
+        if path.startswith("/dev/uorb/") and (not topic or topic in path)
+    )
+    return nodes
+
+
+def get_topics(topic: str = None) -> List[Sensor]:
+    nodes = get_topic_inodes(topic)
+    return (Sensor(node, path=path) for node, path in nodes)
+
+
+class uORBDump(gdb.Command):
+    """Dump uORB topics"""
+
+    formatter = "{:<20} {:<24} {:<6} {:<6} {:<6} {:<6} {:<12} {:<12} {:<20}"
+    header = (
+        "Address",
+        "Topic",
+        "Subs",
+        "Ads",
+        "esize",
+        "nbuf",
+        "latency",
+        "interval",
+        "Circbuf",
+    )
+
+    def __init__(self):
+        super().__init__("uorb", gdb.COMMAND_USER)
+
+    def invoke(self, arg: str, from_tty: bool) -> None:
+        parser = argparse.ArgumentParser(description=self.__doc__)
+        parser.add_argument(
+            "--topic",
+            type=str,
+            help="The topic name to dump, e.g. 'sensor_accel'",
+            default=None,
+        )
+
+        try:
+            args = parser.parse_args(gdb.string_to_argv(arg))
+        except SystemExit:
+            return
+
+        print(self.formatter.format(*self.header))
+        for topic in get_topics(topic=args.topic):
+            print(
+                self.formatter.format(
+                    hex(topic),
+                    topic.topicname,
+                    topic.nsubscribers,
+                    topic.nadvertisers,
+                    topic.state.esize,
+                    topic.state.nbuffer,
+                    topic.state.min_latency,
+                    topic.state.min_interval,
+                    hex(topic.buffer.address),
+                )
+            )


(nuttx) 01/03: tools: rename tools/gdb/nuttxgdb to tools/pynuttx/nxgdb

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 50fb43e23b132c35c3f306c6ba31bb6dbc0880c8
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Tue Nov 26 16:38:06 2024 +0800

    tools: rename tools/gdb/nuttxgdb to tools/pynuttx/nxgdb
    
    Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
 tools/gdb/.gitignore                                      | 2 --
 tools/pynuttx/.gitignore                                  | 2 ++
 tools/{gdb => pynuttx}/gdbinit.py                         | 8 ++++----
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/__init__.py         | 4 ++--
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/debug.py            | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/diagnose.py         | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/dmesg.py            | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/fs.py               | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/gcore.py            | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/lists.py            | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/macros.py           | 4 ++--
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memcheck.py         | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memdump.py          | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/memleak.py          | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/mm.py               | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/net.py              | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/prefix.py           | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/profile.py          | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/fs.py     | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/mm.py     | 2 ++
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/thread.py | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/value.py  | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/wdog.py   | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/protocols/wqueue.py | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/rpmsg.py            | 4 +++-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/stack.py            | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/thread.py           | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/utils.py            | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wdog.py             | 2 +-
 tools/{gdb/nuttxgdb => pynuttx/nxgdb}/wqueue.py           | 2 +-
 tools/{gdb => pynuttx}/pyproject.toml                     | 4 ++--
 tools/{gdb => pynuttx}/requirements.txt                   | 0
 32 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/tools/gdb/.gitignore b/tools/gdb/.gitignore
deleted file mode 100644
index 12681cb30e..0000000000
--- a/tools/gdb/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-dist/
-nuttxgdb.egg-info/
diff --git a/tools/pynuttx/.gitignore b/tools/pynuttx/.gitignore
new file mode 100644
index 0000000000..1abceb8f41
--- /dev/null
+++ b/tools/pynuttx/.gitignore
@@ -0,0 +1,2 @@
+dist/
+nxgdb.egg-info/
diff --git a/tools/gdb/gdbinit.py b/tools/pynuttx/gdbinit.py
similarity index 90%
rename from tools/gdb/gdbinit.py
rename to tools/pynuttx/gdbinit.py
index 2342dcb36f..a965fa3485 100644
--- a/tools/gdb/gdbinit.py
+++ b/tools/pynuttx/gdbinit.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/gdbinit.py
+# tools/pynuttx/gdbinit.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -29,9 +29,9 @@ if __name__ == "__main__":
     if here not in sys.path:
         sys.path.insert(0, here)
 
-    if "nuttxgdb" in sys.modules:
+    if "nxgdb" in sys.modules:
         for key in list(sys.modules.keys()):
-            if key.startswith("nuttxgdb"):
+            if key.startswith("nxgdb"):
                 del sys.modules[key]
 
-    import nuttxgdb  # noqa: F401
+    import nxgdb  # noqa: F401
diff --git a/tools/gdb/nuttxgdb/__init__.py b/tools/pynuttx/nxgdb/__init__.py
similarity index 96%
rename from tools/gdb/nuttxgdb/__init__.py
rename to tools/pynuttx/nxgdb/__init__.py
index 59a9850d27..254cf268e4 100644
--- a/tools/gdb/nuttxgdb/__init__.py
+++ b/tools/pynuttx/nxgdb/__init__.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/__init__.py
+# tools/pynuttx/nxgdb/__init__.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -29,7 +29,7 @@ import gdb
 if __name__ == "__main__":
     import sys
 
-    gdb.write("Use nuttx/tools/gdb/gdbinit.py instead")
+    gdb.write("Use nuttx/tools/pynuttx/gdbinit.py instead")
     sys.exit(1)
 
 here = path.dirname(path.abspath(__file__))
diff --git a/tools/gdb/nuttxgdb/debug.py b/tools/pynuttx/nxgdb/debug.py
similarity index 96%
rename from tools/gdb/nuttxgdb/debug.py
rename to tools/pynuttx/nxgdb/debug.py
index 5303bd2a16..35858b61d2 100644
--- a/tools/gdb/nuttxgdb/debug.py
+++ b/tools/pynuttx/nxgdb/debug.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/debug.py
+# tools/pynuttx/nxgdb/debug.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/diagnose.py b/tools/pynuttx/nxgdb/diagnose.py
similarity index 98%
rename from tools/gdb/nuttxgdb/diagnose.py
rename to tools/pynuttx/nxgdb/diagnose.py
index 139925618f..0a0f694fb4 100644
--- a/tools/gdb/nuttxgdb/diagnose.py
+++ b/tools/pynuttx/nxgdb/diagnose.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttx_gdb/diagnose.py
+# tools/pynuttx/nxgdb/diagnose.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/dmesg.py b/tools/pynuttx/nxgdb/dmesg.py
similarity index 98%
rename from tools/gdb/nuttxgdb/dmesg.py
rename to tools/pynuttx/nxgdb/dmesg.py
index bb291a8276..8f4a487c5f 100644
--- a/tools/gdb/nuttxgdb/dmesg.py
+++ b/tools/pynuttx/nxgdb/dmesg.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/dmesg.py
+# tools/pynuttx/nxgdb/dmesg.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/fs.py b/tools/pynuttx/nxgdb/fs.py
similarity index 99%
rename from tools/gdb/nuttxgdb/fs.py
rename to tools/pynuttx/nxgdb/fs.py
index ea527cbf83..8ecf5017b6 100644
--- a/tools/gdb/nuttxgdb/fs.py
+++ b/tools/pynuttx/nxgdb/fs.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/fs.py
+# tools/pynuttx/nxgdb/fs.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/gcore.py b/tools/pynuttx/nxgdb/gcore.py
similarity index 99%
rename from tools/gdb/nuttxgdb/gcore.py
rename to tools/pynuttx/nxgdb/gcore.py
index 3a30376287..8a2deabfae 100644
--- a/tools/gdb/nuttxgdb/gcore.py
+++ b/tools/pynuttx/nxgdb/gcore.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/gcore.py
+# tools/pynuttx/nxgdb/gcore.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/lists.py b/tools/pynuttx/nxgdb/lists.py
similarity index 99%
rename from tools/gdb/nuttxgdb/lists.py
rename to tools/pynuttx/nxgdb/lists.py
index 0f61925be2..0c6222f1fb 100644
--- a/tools/gdb/nuttxgdb/lists.py
+++ b/tools/pynuttx/nxgdb/lists.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/lists.py
+# tools/pynuttx/nxgdb/lists.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/macros.py b/tools/pynuttx/nxgdb/macros.py
similarity index 98%
rename from tools/gdb/nuttxgdb/macros.py
rename to tools/pynuttx/nxgdb/macros.py
index bc07ec6761..d1d9fa7826 100644
--- a/tools/gdb/nuttxgdb/macros.py
+++ b/tools/pynuttx/nxgdb/macros.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/macros.py
+# tools/pynuttx/nxgdb/macros.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -194,7 +194,7 @@ def do_expand(expr, macro_map):
 
 
 # NOTE: Implement a fully functional parser which can
-# preprocess all the C macros according to ISO 9899 standard
+# preprocess all the C marcos according to ISO 9899 standard
 # may be an overkill, what we really care about are those
 # macros that can be evaluated to a constant value.
 #
diff --git a/tools/gdb/nuttxgdb/memcheck.py b/tools/pynuttx/nxgdb/memcheck.py
similarity index 98%
rename from tools/gdb/nuttxgdb/memcheck.py
rename to tools/pynuttx/nxgdb/memcheck.py
index 8f91c002aa..4cb1c51d6a 100644
--- a/tools/gdb/nuttxgdb/memcheck.py
+++ b/tools/pynuttx/nxgdb/memcheck.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/memcheck.py
+# tools/pynuttx/nxgdb/memcheck.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/memdump.py b/tools/pynuttx/nxgdb/memdump.py
similarity index 99%
rename from tools/gdb/nuttxgdb/memdump.py
rename to tools/pynuttx/nxgdb/memdump.py
index 342e7d2e82..50bafaebee 100644
--- a/tools/gdb/nuttxgdb/memdump.py
+++ b/tools/pynuttx/nxgdb/memdump.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/memdump.py
+# tools/pynuttx/nxgdb/memdump.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/memleak.py b/tools/pynuttx/nxgdb/memleak.py
similarity index 99%
rename from tools/gdb/nuttxgdb/memleak.py
rename to tools/pynuttx/nxgdb/memleak.py
index 4c80edd738..9ffdfbda48 100644
--- a/tools/gdb/nuttxgdb/memleak.py
+++ b/tools/pynuttx/nxgdb/memleak.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/memleak.py
+# tools/pynuttx/nxgdb/memleak.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/mm.py b/tools/pynuttx/nxgdb/mm.py
similarity index 99%
rename from tools/gdb/nuttxgdb/mm.py
rename to tools/pynuttx/nxgdb/mm.py
index bb923ecd5e..7104a1ce73 100644
--- a/tools/gdb/nuttxgdb/mm.py
+++ b/tools/pynuttx/nxgdb/mm.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/mm.py
+# tools/pynuttx/nxgdb/mm.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/net.py b/tools/pynuttx/nxgdb/net.py
similarity index 99%
rename from tools/gdb/nuttxgdb/net.py
rename to tools/pynuttx/nxgdb/net.py
index 256267af50..ffb23a113d 100644
--- a/tools/gdb/nuttxgdb/net.py
+++ b/tools/pynuttx/nxgdb/net.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/net.py
+# tools/pynuttx/nxgdb/net.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/prefix.py b/tools/pynuttx/nxgdb/prefix.py
similarity index 97%
rename from tools/gdb/nuttxgdb/prefix.py
rename to tools/pynuttx/nxgdb/prefix.py
index 903d69bf25..1f3ce210e8 100644
--- a/tools/gdb/nuttxgdb/prefix.py
+++ b/tools/pynuttx/nxgdb/prefix.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttx_gdb/prefix.py
+# tools/pynuttx/nxgdb/prefix.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/profile.py b/tools/pynuttx/nxgdb/profile.py
similarity index 98%
rename from tools/gdb/nuttxgdb/profile.py
rename to tools/pynuttx/nxgdb/profile.py
index bf466f5742..1d16abef45 100644
--- a/tools/gdb/nuttxgdb/profile.py
+++ b/tools/pynuttx/nxgdb/profile.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/profile.py
+# tools/pynuttx/nxgdb/profile.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/protocols/fs.py b/tools/pynuttx/nxgdb/protocols/fs.py
similarity index 95%
rename from tools/gdb/nuttxgdb/protocols/fs.py
rename to tools/pynuttx/nxgdb/protocols/fs.py
index 787bcb578b..b36d6c554f 100644
--- a/tools/gdb/nuttxgdb/protocols/fs.py
+++ b/tools/pynuttx/nxgdb/protocols/fs.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/protocols/fs.py
+# tools/pynuttx/nxgdb/protocols/fs.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/protocols/mm.py b/tools/pynuttx/nxgdb/protocols/mm.py
similarity index 98%
rename from tools/gdb/nuttxgdb/protocols/mm.py
rename to tools/pynuttx/nxgdb/protocols/mm.py
index 96d9ae66a6..3935b1b09f 100644
--- a/tools/gdb/nuttxgdb/protocols/mm.py
+++ b/tools/pynuttx/nxgdb/protocols/mm.py
@@ -1,6 +1,8 @@
 ############################################################################
 # tools/gdb/nuttxgdb/protocols/mm.py
 #
+# SPDX-License-Identifier: Apache-2.0
+#
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.  The
diff --git a/tools/gdb/nuttxgdb/protocols/thread.py b/tools/pynuttx/nxgdb/protocols/thread.py
similarity index 97%
rename from tools/gdb/nuttxgdb/protocols/thread.py
rename to tools/pynuttx/nxgdb/protocols/thread.py
index 9572b0feaa..71e970bea8 100644
--- a/tools/gdb/nuttxgdb/protocols/thread.py
+++ b/tools/pynuttx/nxgdb/protocols/thread.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/protocols/thread.py
+# tools/pynuttx/nxgdb/protocols/thread.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/protocols/value.py b/tools/pynuttx/nxgdb/protocols/value.py
similarity index 96%
rename from tools/gdb/nuttxgdb/protocols/value.py
rename to tools/pynuttx/nxgdb/protocols/value.py
index 6167e5fc8a..2964b94be3 100644
--- a/tools/gdb/nuttxgdb/protocols/value.py
+++ b/tools/pynuttx/nxgdb/protocols/value.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/nuttxgdb/protocols/value.py
+# tools/pynuttx/nxgdb/protocols/value.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/protocols/wdog.py b/tools/pynuttx/nxgdb/protocols/wdog.py
similarity index 96%
rename from tools/gdb/nuttxgdb/protocols/wdog.py
rename to tools/pynuttx/nxgdb/protocols/wdog.py
index dc8cecfc66..a8bf968d99 100644
--- a/tools/gdb/nuttxgdb/protocols/wdog.py
+++ b/tools/pynuttx/nxgdb/protocols/wdog.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/protocols/wdog.py
+# tools/pynuttx/nxgdb/protocols/wdog.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/protocols/wqueue.py b/tools/pynuttx/nxgdb/protocols/wqueue.py
similarity index 97%
rename from tools/gdb/nuttxgdb/protocols/wqueue.py
rename to tools/pynuttx/nxgdb/protocols/wqueue.py
index 479175478d..9c5e5808a5 100644
--- a/tools/gdb/nuttxgdb/protocols/wqueue.py
+++ b/tools/pynuttx/nxgdb/protocols/wqueue.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/protocols/wqueue.py
+# tools/pynuttx/nxgdb/protocols/wqueue.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/rpmsg.py b/tools/pynuttx/nxgdb/rpmsg.py
similarity index 98%
rename from tools/gdb/nuttxgdb/rpmsg.py
rename to tools/pynuttx/nxgdb/rpmsg.py
index 4bb805c97c..a00e224935 100644
--- a/tools/gdb/nuttxgdb/rpmsg.py
+++ b/tools/pynuttx/nxgdb/rpmsg.py
@@ -1,5 +1,7 @@
 ############################################################################
-# tools/gdb/rpmsg.py
+# tools/pynuttx/rpmsg.py
+#
+# SPDX-License-Identifier: Apache-2.0
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
diff --git a/tools/gdb/nuttxgdb/stack.py b/tools/pynuttx/nxgdb/stack.py
similarity index 99%
rename from tools/gdb/nuttxgdb/stack.py
rename to tools/pynuttx/nxgdb/stack.py
index 53c936e29f..132cb9a84d 100644
--- a/tools/gdb/nuttxgdb/stack.py
+++ b/tools/pynuttx/nxgdb/stack.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/stack.py
+# tools/pynuttx/nxgdb/stack.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/thread.py b/tools/pynuttx/nxgdb/thread.py
similarity index 99%
rename from tools/gdb/nuttxgdb/thread.py
rename to tools/pynuttx/nxgdb/thread.py
index ef08489bf1..a1e98f40d8 100644
--- a/tools/gdb/nuttxgdb/thread.py
+++ b/tools/pynuttx/nxgdb/thread.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/thread.py
+# tools/pynuttx/nxgdb/thread.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/utils.py b/tools/pynuttx/nxgdb/utils.py
similarity index 99%
rename from tools/gdb/nuttxgdb/utils.py
rename to tools/pynuttx/nxgdb/utils.py
index b79f5850e1..e33530f977 100644
--- a/tools/gdb/nuttxgdb/utils.py
+++ b/tools/pynuttx/nxgdb/utils.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/utils.py
+# tools/pynuttx/nxgdb/utils.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/wdog.py b/tools/pynuttx/nxgdb/wdog.py
similarity index 98%
rename from tools/gdb/nuttxgdb/wdog.py
rename to tools/pynuttx/nxgdb/wdog.py
index f25d3c26b6..bd248f8274 100644
--- a/tools/gdb/nuttxgdb/wdog.py
+++ b/tools/pynuttx/nxgdb/wdog.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/wdog.py
+# tools/pynuttx/nxgdb/wdog.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/nuttxgdb/wqueue.py b/tools/pynuttx/nxgdb/wqueue.py
similarity index 99%
rename from tools/gdb/nuttxgdb/wqueue.py
rename to tools/pynuttx/nxgdb/wqueue.py
index a768411f39..52abf553a2 100644
--- a/tools/gdb/nuttxgdb/wqueue.py
+++ b/tools/pynuttx/nxgdb/wqueue.py
@@ -1,5 +1,5 @@
 ############################################################################
-# tools/gdb/nuttxgdb/wqueue.py
+# tools/pynuttx/nxgdb/wqueue.py
 #
 # SPDX-License-Identifier: Apache-2.0
 #
diff --git a/tools/gdb/pyproject.toml b/tools/pynuttx/pyproject.toml
similarity index 92%
rename from tools/gdb/pyproject.toml
rename to tools/pynuttx/pyproject.toml
index b8b271cbd9..d8dc657723 100644
--- a/tools/gdb/pyproject.toml
+++ b/tools/pynuttx/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 version = "0.0.1"
-name = 'nuttxgdb'
+name = 'nxgdb'
 description = 'NuttX RTOS GDB extensions'
 readme = "README.md"
 license = { file = 'LICENSE' }
@@ -19,4 +19,4 @@ dependencies = ["matplotlib", "numpy", "pyelftools"]
 requires-python = ">=3.8"
 
 [tool.setuptools.package-dir]
-nuttxgdb = "nuttxgdb"
+nxgdb = "nxgdb"
diff --git a/tools/gdb/requirements.txt b/tools/pynuttx/requirements.txt
similarity index 100%
rename from tools/gdb/requirements.txt
rename to tools/pynuttx/requirements.txt


(nuttx) 03/03: nxgdb: include all files to package

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 698b2e00e6d5ca3b53e4218aa0a2f6469955bc91
Author: Neo Xu <ne...@gmail.com>
AuthorDate: Sat Feb 1 12:34:44 2025 +0800

    nxgdb: include all files to package
    
    Signed-off-by: Neo Xu <ne...@gmail.com>
---
 tools/pynuttx/pyproject.toml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/pynuttx/pyproject.toml b/tools/pynuttx/pyproject.toml
index d8dc657723..d6dd27ea9d 100644
--- a/tools/pynuttx/pyproject.toml
+++ b/tools/pynuttx/pyproject.toml
@@ -20,3 +20,6 @@ requires-python = ">=3.8"
 
 [tool.setuptools.package-dir]
 nxgdb = "nxgdb"
+
+[tool.setuptools.package-data]
+nxgdb = ["nxgdb/*"]