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 0/2] Miscellaneous fixes around type equality check


Hi there,

Recently I was using gdb intensively to inspect the run-time values for the project in Yandex company I'm working on. I've implemented a custom pretty-printer in Python and found out several cases when comparison for gdb.type in Python was not working properly and that was caused by a wrong behavior of an internal gdb "types_deeply_equal" procedure. I did my best to fix a few bugs, namely: 
* first was the uninitialized ARTIFICIAL bit of struct field when reading the enum members from DWARF2 information;
* second was the case in check_types_equal procedure when it added entries {NULL, NULL} to the worklist leading to a crash during the attempt of "check_typedef (type1)".

I didn't succeed in creating a small example of the wrong behavior for adding into a testsuite, because in all my synthetic tests the types_deeply_equal actually took the short path when type1 == type2, and didn't invoke the check_types_equal routine. Unfortunately, the binary I was debugging in my project is a pretty large internal tool that I can not simply share with you.

Running the existing testsuite on x86-64 didn't show any regression.

I hope those changes will be accepted as they are both pretty obvious even without expanding the testsuite. And this is my first attempt of contributing to open source :)

-- 
Best wishes,
Maxim Akhmedov
max42@yandex-team.com


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