Oopenvela-robottools/nxgdbmcp: remove some legacy code
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
nxgdb: split fs.py into submodule Refactor fs into a submodule while preserving all functionality. Public APIs and classes are now auto-imported via __init__.py when using import nxgdb.fs. Internal APIs and classes should be imported via their full path, e.g., import nxgdb.fs.utils. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com> | 2 个月前 | |
tools/nxgdbmcp: remove some legacy code nxgdbmcp contains some legacy code. This is because in its earliest design, nxgdbmcp had the ability to actively launch a GDB child process to hijack its stdio interaction, thus performing more complex actions. However, now it can only interact with GDB through gdbrpc, so some actions should be assumed to have been performed by the user. We found that adapting for each command results in significant token consumption for users. Firstly, the native command support for GDB can be removed. Secondly, regarding the nxgdb part, we need the nxgdb developers to write better help information so that the model can accurately understand it. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com> | 2 个月前 | |
gdb:add "info fatfs" command to dump fatfs information eg: (gdb) info fatfs -F 0x4245e544 Fatfs /data mount point information: 0x4025bf00 { fat = { win = "APP "..., fs_type = 2 '\002', pdrv = 0 '\000', n_fats = 2 '\002', wflag = 0 '\000', fsi_flag = 129 '\201', id = 1, n_rootdir = 512, csize = 8, lfnbuf = 0x40262e38 <buf+93400>, dirbuf = 0x40263038 <buf+93912> "", last_clst = 4294967295, free_clst = 44453, n_fatent = 65469, fsize = 256, volbase = 0, fatbase = 8, dirbase = 520, database = 552, bitbase = 0, bitdirty = 0 '\000', bitcache = 0x0, winsect = 520 }, pdrv = 0 '\000', lock = { sem = { semcount = 1, flags = 4 '\004', waitlist = { head = 0x0, tail = 0x0 } }, holder = -1 }, nb = { notifier_call = 0x66d5a9 <fatfs_reboot_notifier>, next = 0x0, priority = 0 } } Fatfs /data driver information: 0x4227680c ratio 0x1 block operations: { open = 0x60fc01 <virtio_blk_open>, close = 0x60fbbd <virtio_blk_close>, read = 0x60fe65 <virtio_blk_read>, write = 0x60fe05 <virtio_blk_write>, geometry = 0x60fb61 <virtio_blk_geometry>, ioctl = 0x60fc45 <virtio_blk_ioctl>, unlink = 0x0 } Fatfs filep information: 0x4245e544 { f_oflags = 1025, f_refs = 2, f_pos = 0, f_inode = 0x4025be88 <buf+64808>, f_priv = 0x4025fa80 <buf+80160>, f_tag_fdsan = 0, f_tag_fdcheck = 89 'Y', locked = false } Fatfs file information: 0x4025fa80 { f = { buf = '\000' <repeats 511 times>, obj = { fs = 0x4025bf00 <buf+64928>, id = 1, attr = 0 '\000', stat = 0 '\000', sclust = 19977, objsize = 12288, n_cont = 1076215648, n_frag = 1414743380, c_scl = 1162297680, c_size = 119545888, c_ofs = 4294967295 }, flag = 1 '\001', err = 0 '\000', fptr = 0, clust = 4158, sect = 0, dir_sect = 520, dir_ptr = 0x4025bf40 <buf+64992> "PERSIST DB \030", cltbl = 0x0 }, refs = 1, path = "0:persist.db... } Signed-off-by: guohao15 <guohao15@xiaomi.com> | 2 个月前 | |
fdinfo:fix filep address in fdinfo command Signed-off-by: guohao15 <guohao15@xiaomi.com> | 2 个月前 | |
feat(gdb/binder): refactor binderdump command with improved architecture Refactor binder debugging module with better separation of concerns and improved code quality. Major changes: 1. Architecture improvements: - Separate data retrieval logic (module-level functions) from presentation layer (BinderDump class methods) - Add reusable helper functions: get_servicemanager(), get_binder_device(), get_process_self(), get_services(), get_proc_list() - Remove private method naming (leading underscores) for public API 2. Enhanced service listing: - get_services() now returns complete service information including binder pointer, isolation permission, dump priority, and PID - Improved output formatting with aligned columns 3. Iterator pattern for thread frame traversal: - Convert get_thread_frames() to generator using yield - Support flexible argument types: gdb.InferiorThread, int, or gdb.Value - Cleaner iteration without manual list accumulation 4. Code quality improvements: - Remove unnecessary try-except blocks - Add get_proc_list() to eliminate code duplication - Fix variable naming conflicts in dump_driver() - Improve type annotations (list[dict] instead of list[tuple]) 5. Enhanced filesystem filtering: - fstype_filter() now supports both mountpoint filesystem types and inode types (e.g., "DRIVER", "BLOCK") Signed-off-by: cuiziwei <cuiziwei@xiaomi.com> | 2 个月前 | |
nxgdb: split fs.py into submodule Refactor fs into a submodule while preserving all functionality. Public APIs and classes are now auto-imported via __init__.py when using import nxgdb.fs. Internal APIs and classes should be imported via their full path, e.g., import nxgdb.fs.utils. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com> | 2 个月前 | |
gdb:add "info lrofs" command eg:(gdb) info lrofs Lrofs /lrofs mount point information: 0xf1316c08 HW sector size: 512 HW sector number: 10240 Volume size: 492 XIP_addr: 0x0 Buffer_addr: 0xf1bc9998 ├── / offset:32 next:1 size:0 child_count:5 │ └── . offset:32 next:65 size:0 child_count:0 │ └── .. offset:32 next:97 size:0 child_count:0 │ ├── a/ offset:96 next:193 size:0 child_count:3 │ │ └── . offset:128 next:161 size:0 child_count:0 │ │ └── .. offset:160 next:481 size:0 child_count:0 │ │ └── aaa offset:480 next:2 size:4 child_count:0 │ ├── b/ offset:192 next:289 size:0 child_count:3 │ │ └── . offset:224 next:257 size:0 child_count:0 │ │ └── .. offset:256 next:993 size:0 child_count:0 │ │ └── bbb offset:992 next:2 size:4 child_count:0 │ ├── c/ offset:288 next:1 size:0 child_count:3 │ │ └── . offset:320 next:353 size:0 child_count:0 │ │ └── .. offset:352 next:1505 size:0 child_count:0 │ │ └── ccc offset:1504 next:2 size:4 child_count:0 Signed-off-by: guohao15 <guohao15@xiaomi.com> | 2 个月前 | |
nxgdb: split fs.py into submodule Refactor fs into a submodule while preserving all functionality. Public APIs and classes are now auto-imported via __init__.py when using import nxgdb.fs. Internal APIs and classes should be imported via their full path, e.g., import nxgdb.fs.utils. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com> | 2 个月前 | |
nxgdb/fs: avoid parsing macro Since it's slow and not reliable. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com> | 2 个月前 | |
nxgdb: split fs.py into submodule Refactor fs into a submodule while preserving all functionality. Public APIs and classes are now auto-imported via __init__.py when using import nxgdb.fs. Internal APIs and classes should be imported via their full path, e.g., import nxgdb.fs.utils. Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com> | 2 个月前 |