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]

[RFA] Verify that address is provided in add-symbol-file command


Hello,

We have a mysterious crash of our debugger (6.3-based) debugger on
hppa-hpux when we did something like this:

        % gdb
        (gdb) set confirm off
        (gdb) add-symbol-file a.o

As you see, we forgot to provide the text address where a.o was
loaded. The current code verifies that the filename is provided,
but doesn't verify that the address is there.

This is what the attached does. Otherwise, we ended creating a
section_addr_info struct with zero section, and bad things happened.

2005-02-02  Joel Brobecker  <brobecker@adacore.com>

        * symfile.c (add_symbol_file_command): Abort if the user forgot
        to provide the address when the file has been loaded.
        For F130-030.

Tested on hppa-hpux and x86-linux. No regression.

OK to apply?
Want a new testcase for it?
-- 
Joel

Attachment: symfile.c.diff
Description: Text document


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