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] |
Other format: | [Raw text] |
Daniel, On Wednesday, March 20, 2002, at 03:18 PM, Daniel Jacobowitz wrote: > On Mon, Mar 18, 2002 at 12:01:04PM -0800, Jim Ingham wrote: >> In fact, since the ABI's are all added in _initialize functions, it >> would be >> even simpler just to fix the size of the array. When somebody adds the >> "last straw" ABI to gdb, we can just spit out a message saying >> increase this >> number, and that developer can do so and recompile. This is safe >> since I >> don't think we really have the intention that we are adding these >> things >> dynamically at runtime... > > Definitely not as GDB stands, and I don't see a point. This bit is > fine. Groovy. > >>> >>>> const char *name = SYMBOL_NAME (&objfile->msymbols[i]); >>>> if (name[0] == '_' && name[1] == 'Z') >>>> { >>>> + if (cp_abi_is_auto_p ()) >>>> switch_to_cp_abi ("gnu-v3"); >>>> break; >>>> } >>> >>> This bit, of course, is great :) >> >> Way too much work to get there, however. Another point that is >> unclear to >> me, should this instead be: >> >> if (cp_abi_is_auto_p ()) >> set_cp_abi_as_auto_default ("gnu_v3"); >> break; >> >> I would have to change set_... to take the name rather than a >> structure, and >> look it up (and add a lookup_cp_abi to be nice). But it fits with the >> set >> lang more. OTOH, I have already spent more time on this that it >> deserves by >> a long shot, so... > > I suppose that this would be best; if we set cp-abi to auto it should > remain v3. I can't tell which option you mean here, but I think you mean we should register v3 as auto. Assuming that is true, I fixed the code to do that. I also changed the "show cp-abi" output to also put out the doc string, since in the auto case this is much more helpful. Now you see, for instance: (gdb) show cp-abi The currently selected C++ ABI is: auto - currently gnu-v3. which is more informative. > >> I am including a new patch, with just the cp-abi.c bits to keep it >> smaller, >> and I didn't edit this one to change the indentation goofs that the >> mailer >> added (I did with the last patch, oh fun...). > > Mangled patches are a pain to read. If you can't get a mailer that > won't mangle it inline, can you at least get them attached in some > vaguely sane MIME-ish way? > > Other than set_cp_abi_as_auto_default, my only remaining nits are > grammatical again: > ! error ("Too many CP ABI's, please increase CP_ABI_MAX in cp- > abi.c"); > > internal_error(), and "C++ ABIs". Yeah, I figured this out about 5 seconds after hitting send. > > + if (!switch_to_cp_abi (args)) > + error ("Could not find ABI: \"%s\" in ABI list\n", args); > > "Could not find \"%s\" in ABI list" (and no \n) > > + ui_out_text (uiout, "The currently selected C++ abi is: "); > > "ABI", not "abi". Okay. > > And show_cp_abis should probably mention "auto". It does viz: (gdb) set cp-abi The available C++ ABIs are: gnu-v2 - G++ Version 2 ABI gnu-v3 - G++ Version 3 ABI hpaCC - HP aCC ABI auto - currently gnu-v2 That is part of the point of adding a real auto to the ABI list... > > With the above changes it should be OK, although I would like to see > it. Thanks for following this through. Okay, let's see what Mail.app thinks is an attachment... Jim
Attachment:
cp-abi.diff
Description: Binary data
-- Jim Ingham jingham@apple.com Developer Tools - gdb Apple Computer
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |