问题描述:

I am currently using gdb to debug a file. I have set a breakpoint at one of the file's methods, which takes in as arguments two FILE pointers. I ran a print *filename1 on one of the passed in arguments (filename1). It outputted the following:

$4 = {_flags = -72540028, _IO_read_ptr = 0x0, _IO_read_end = 0x0, _IO_read_base = 0x0,

_IO_write_base = 0x0, _IO_write_ptr = 0x0, _IO_write_end = 0x0, _IO_buf_base = 0x0,

_IO_buf_end = 0x0, _IO_save_base = 0x0, _IO_backup_base = 0x0, _IO_save_end = 0x0,

_markers = 0x0, _chain = 0x7ffff7dd4340, _fileno = 1, _flags2 = 0, _old_offset = -1,

_cur_column = 0, _vtable_offset = 0 '\000', _shortbuf = "", _lock = 0x7ffff7dd5ab0,

_offset = -1, __pad1 = 0x0, __pad2 = 0x7ffff7dd4580, __pad3 = 0x0, __pad4 = 0x0, __pad5 = 0,

_mode = 0, _unused2 = '\000' <repeats 19 times>}

It should be noted that print filename2 done on the other filename yields the following: $1 = (FILE *) 0x7ffff7dd4340

What I was wondering is how I can interpret these values? What is _flags and _chain? I haven't been able to find any big documentation on interpreting this output. Any help would be appreciated.

相关阅读:
Top