guohao15 opened a new pull request, #17511:
URL: https://github.com/apache/nuttx/pull/17511

   
   
   ## Summary
   Add some gdb plugin command for debug 
   
   info romfs : dump romfs information cached in memory
       E.g.
       (gdb) info romfs -P /system
       Romfs /system mount point information: 0x40861190
        HW sector size: 512 HW sector number: 89856
        Volume size: 46006208 XIP_addr: 0x0 Buffer_addr: 0x4085ec88
       ├── / offset:32 next:1 size:0 child_count:1
       │   ├── font/ offset:128 next:9 size:0 child_count:7
       │   │   └── MI_Lan_Pro_Medium.ttf offset:5172176 next:13911490 
size:8739260 child_count:0
       │   │   └── MiSansW_Demibold.ttf offset:2594656 next:5172178 
size:2577464 child_count:0
       │   │   └── MiSansW_Normal.ttf offset:43396912 next:2 size:2609248 
child_count:0
       │   │   └── MiSansW_Regular.ttf offset:128 next:2594658 size:2594476 
child_count:0
       │   │   ├── plus/ offset:25698912 next:33643465 size:0 child_count:1
       │   │   │   ├── font/ offset:25698944 next:33643401 size:0 child_count:1
       │   │   │   │   └── MiSansW_Normal.ttf offset:25699008 next:2 
size:7944332 child_count:0
       │   │   └── simhei.ttf offset:33643488 next:43396922 size:9753388 
child_count:0
       │   │   └── simkai.ttf offset:13911520 next:25698882 size:11787328 
child_count:0
   
   
   info fatfs: dump fatfs information cached in memory
     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...
       }
   
   ## Impact
   ## Testing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to