This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch - Crash while printing static variables without global symbols.


Hello,

I've found a bug related to the variable printing functionality for C++
language. The bug showed itself when GDB tried to print a static
variable and global symbol describing that variable wasn't found in
object files. I've added a simple sanity checking just to prevent
accessing an empty pointer in such a case, by skipping
'cp_print_static_field' (gdb/cp-varprint.c:329) function.

Attached archive consists of the following files:
0001-This-fix-prevents-crashes-while-accessing-static-var.patch - commit
as git format-path

0001-This-fix-prevents-crashes-while-accessing-static-var.diff - plain
diff.

ChangeLog - Change log entry.

Regards,
SÅawomir Wojtasiak

Attachment: gdb-patch.tgz
Description: application/compressed-tar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]