From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Daniel Berlin Cc: gdb-patches@sources.redhat.com Subject: macro-expanding expressions in GDB Date: Thu, 07 Jun 2001 08:47:00 -0000 Message-id: References: <87ofsldrgr.fsf@dynamic-addr-83-177.resnet.rochester.edu> <15134.47162.825017.119342@kwikemart.cygnus.com> <87g0dc7u5w.fsf@cgsoftware.com> X-SW-Source: 2001-06/msg00127.html Daniel Berlin writes: > Speaking of real parsers, i've hooked up GCC's cpplib to GDB's c > expression parser if anyone is interested in the work. I'll > eventually submit it once the hooks to do the necessary gdb lookups to > handle macros are done. Neil said he'd try to have something This is a feature to die for. Fantastic. I have two concerns about using cpplib: - I don't want GDB builds to require the GCC sources around. This is mostly bureacracy --- we'd need to have cpplib moved into its own top-level directory, so we could share it with GCC. - I wonder how much of cpplib we actually need. We don't need #includes, #ifs, or CPP expression evaluation. cpplib seems heavyweight. This is somewhat nitpicky. Sorry, which Niel? If I can find the bandwidth, I'd love to do the symbol table support for this. > I also submitted patches to gcc to make it produce the dwarf2 macro > info necessary for us to let the user use macros from GDB that are > used in the source. And we don't even need to wait for that. We can add the macro info to the .s files manually, and test against those files.