0

Is there any GDB command I can use that will show only source file created by user. I mean no source files belonging to libraries like stdio,string and etc. If I use the info sources I will receive all the files used in project, i want only files I create i.e. main file and files I include using #include "someFile.c". and not files included using <>

for example if I have: main.c, otherFile.c, otherFile.h

and the main has:

#include <stdio.h>
#include <string.h>
#include "otherFile.h"

when i ask for source files i will see only: main.c, otherFile.h, otherFile.c

Thanks in advance

ariel6653
  • 116
  • 1
  • 7
  • Probably not in straight `gdb`. But, IIRC, you can write a python program that binds to (e.g.) `libgdb` and you can write whatever custom interface/command you want. See: https://stackoverflow.com/questions/3482869/invoke-and-control-gdb-from-python – Craig Estey Oct 21 '18 at 21:42
  • If you can construct a regex for your sources, you can use https://stackoverflow.com/a/41965636/72178. – ks1322 Oct 25 '18 at 10:35

0 Answers0