[PATCH][gdb] Fix segv in "maint print symbols" for ada exec
Tom Tromey
tom@tromey.com
Tue Mar 10 16:40:17 GMT 2020
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> What happens is that dwarf2_evaluate_property gets called and sets the local
Tom> frame variable to the current frame, which happens to be NULL. Subsequently
Tom> the PROP_LOCLIST handling code is executed, where get_frame_address_in_block
Tom> gets called with argument NULL, and the segv is triggered.
Tom> Fix this by handling a NULL frame in the PROP_LOCLIST handling code in
Tom> dwarf2_evaluate_property.
Thank you for doing this. This seems reasonable.
I had one request...
Tom> clean_restart ${testfile}
Tom> +gdb_test_no_output "maint expand-symtabs"
Tom> +gdb_test "set logging redirect on"
Tom> +gdb_test "set logging on"
Tom> +gdb_test "maint print symbols"
Tom> +gdb_test "set logging off"
Tom> +file delete gdb.txt
I think this code should set the logging file to something in the
output directory. This way if other tests do the same thing, there
won't be a possibility of a clash.
After this, there's no real need to delete the file; though it's fine if
you still want to do that.
Tom
More information about the Gdb-patches
mailing list