(gdb) set args -n -r ../liar.dat (gdb) run Starting program: ./tcpdump -n -r test.dat tcpdump: pcap_loop: bogus savefile header Program exited with code 01. (gdb) break pcap_loop Breakpoint 1 at 0x12001b888: file ./pcap.c, line 64. (gdb) run Starting program: ./tcpdump -n -r ./test.dat Breakpoint 1, pcap_loop (p=0x1200091e0, cnt=536880064, callback=0, user=0x1201366e0 "à $ \001") at ./pcap.c:64 64 { pcap_loop (p=0x1202420e0, cnt=-1, callback=0x1200091e0 , user=0x0) at ./pcap.c:68 68 if (p->sf.rfile != NULL) (gdb) step 69 n = pcap_offline_read(p, cnt, callback, user); (gdb) step pcap_offline_read (p=0x1202420e0, cnt=538142676, callback=0x12013661c , user=0x0) at ./savefile.c:281 281 { (gdb) step pcap_offline_read (p=0x1202420e0, cnt=538142676, callback=0x12013661c , user=0x0) at ./savefile.c:284 284 int n = 0; (gdb) step 281 { (gdb) step 282 struct bpf_insn *fcode = p->fcode.bf_insns; (gdb) step 289 status = sf_next_packet(p, &h, p->buffer, p->bufsize); (gdb) step sf_next_packet (p=0x0, hdr=0xffffffffffffffff, buf=0x0, buflen=536908256) at ./savefile.c:196 196 { (gdb) step sf_next_packet (p=0x1202420e0, hdr=0x11ffff970, buf=0x0, buflen=8192) at ./savefile.c:200 200 if (fread((char *)hdr, sizeof(struct pcap_pkthdr), 1, fp) != 1) { (gdb) step 196 { (gdb) step 200 if (fread((char *)hdr, sizeof(struct pcap_pkthdr), 1, fp) != 1) { (gdb) step 196 { (gdb) step 197 FILE *fp = p->sf.rfile; (gdb) step 196 { (gdb) step 200 if (fread((char *)hdr, sizeof(struct pcap_pkthdr), 1, fp) != 1) { (gdb) step _IO_fread (buf=0x120241960, size=4834206368, count=18446744073709551615, fp=0x11ffff970) at iofread.c:34 iofread.c:34: No such file or directory. (gdb) back #0 _IO_fread (buf=0x120241960, size=4834206368, count=18446744073709551615, fp=0x11ffff970) at iofread.c:34 #1 0x120023464 in pcap_offline_read (p=0x1202420e0, cnt=-1, callback=0x2000, user=0x0) at ./savefile.c:289 warning: Hit heuristic-fence-post without finding warning: enclosing function for address 0x1202420e0 This warning occurs if you are debugging a function without any symbols (for example, in a stripped executable). In that case, you may wish to increase the size of the search with the `set heuristic-fence-post' command. Otherwise, you told GDB there was a function where there isn't one, or (more likely) you have encountered a bug in GDB.