0

I am search for gdb command information list to display code of specific file which is device driver in uncompressed linux built kernel. its a realTek ethernet driver file r8169_main.c that I am trying to see the code of. it contains the __init__(main() in userspace) and probe (interrupt rutine)

user786
  • 3,902
  • 4
  • 40
  • 72
  • there is `source path` in `gdb` does anyone knows about that. just a command to search and locate gdb to driver directory so I can list the `r8169_main.c` Ethernet driver file – user786 Jun 03 '21 at 06:55
  • 1
    source code is not included in the compiled kernel. you would need a separate debug build. – stark Jun 03 '21 at 09:56
  • @stark when compiling I added these flags `CONFIG_NAME_OF_FLAG=y` as given in this answer https://stackoverflow.com/a/44226360/4808760 – user786 Jun 03 '21 at 10:14
  • GDB can list the source code of functions or `filename:linenumber`. Taking a look at https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/realtek/r8169_main.c , which functions or lines in that file do you want GDB to show? – Mark Plotnick Jun 03 '21 at 15:19
  • @MarkPlotnick I need the start of `rtl_rx` function which called from NAPI `poll` handler in r8169_main.cs in linux link which u mentioned in comment – user786 Jun 03 '21 at 15:53

0 Answers0