This is the mail archive of the gdb-patches@sources.redhat.com 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]

Side-effects of double-parsing patch



Fernando,

The patch of 2001-01-26 to fix double parsing of filenames causes some
other changes, and I'm not certain which are intentional.  [A quick
review for the general audience: GDB used to call symbol_file_command
in a number of places for, well, reading the symbol file.  However,
when called "internally" (that is, for purposes other than
implementing the symbol-file command), this caused file names to get
parsed twice, with odd effects in some cases.  These calls were therefore
changed to calls to symbol_file_add_main, which immediately calls
symbol_file_add with some filled-in arguments.]

Now here's my question: symbol_file_command eventually calls
symbol_file_add, too, but it then goes on to call RESET_HP_UX_GLOBALS, 
reinit_cache_frame, and set_initial_language.  This no longer happens
for the "internal" calls.  One side effect is that set_initial_language is 
not called when GDB starts up, so that one now always starts in C (I think).
Unfortunately, this turns out to be a slight problem in the changes I am 
making for Ada.  This could be just a peculiarity of Ada, of course, so before
I do anything kludgey, may I ask what the reasoning was behind dispensing with 
these three calls?

Thanks.

Paul Hilfinger


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