This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Cannot access “pinfo” in gdb

0

I am using wireshark version 1.12.6. I want to debug a specific packet in a capture file. I followed the development tips from https://wiki.wireshark.org/Development/Tips. But when i set a condition on the breakpoint in GDB, i get following message.

(gdb) condition 1 pinfo->fd->num == 132
No symbol "pinfo" in current context.

How do I access "pinfo"?

asked 19 Jul '15, 21:55

PratikYeole's gravatar image

PratikYeole
6113
accept rate: 0%

edited 20 Jul '15, 10:24

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196


One Answer:

1

As indicated in the wiki, this breakpoint the will only work if pinfo structure is given as parameter to the function you are interested in (pinfo structure is not global but is a local variable).

If your function does not have access to pinfo (as the error you get suggest) either modify the source code to pass it as a parameter or put the breakpoint in whatever parent function which has access to pinfo structure. Or use another condition than the frame number ;)

answered 20 Jul '15, 11:24

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k1060
accept rate: 30%