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 65a93e972cdc224bae1b47ee329727f51d18679b Author: xuxingliang <[email protected]> AuthorDate: Mon Sep 23 11:39:29 2024 +0800 tools/gdb: guide user for correct usage of nuttxgdb Should use gdbinit.py instead of package __init__.py. Report the correct usage if user try to source the package directly. Signed-off-by: xuxingliang <[email protected]> --- tools/gdb/nuttxgdb/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/gdb/nuttxgdb/__init__.py b/tools/gdb/nuttxgdb/__init__.py index 10cffc619b..ab80ed5411 100644 --- a/tools/gdb/nuttxgdb/__init__.py +++ b/tools/gdb/nuttxgdb/__init__.py @@ -25,6 +25,12 @@ from os import path import gdb +if __name__ == "__main__": + import sys + + gdb.write("Use nuttx/tools/gdb/gdbinit.py instead") + sys.exit(1) + here = path.dirname(path.abspath(__file__))
