This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
To Dodji Seketeli: I'm sorry recent weeks I've got busy and my plugin is also found a bug when compiling qemu, the bug is linking to cascaded case and should be fixed in the attachment on gcc-4.7.1. Later is the response from previous mail. ------------------------- macro_end_expand can't be moved to _cpp_pop_context. My plugin shows later results when `Gs callee _cpp_pop_context'. GS multiple definition: 1)libcpp/directives.c 8130 skip_rest_of_line DEF_FUNC 2)libcpp/macro.c 67161 expand_arg DEF_FUNC 3)libcpp/macro.c 72900 cpp_get_token_1 DEF_FUNC 4)libcpp/traditional.c 10560 _cpp_scan_out_logical_line DEF_FUNC So macro_start_expand can't be moved to enter_macro_context since the pair should be matched in the same function cpp_get_token_1. 1) macro_start_expand and macro_end_arg are used to tag all macro tokens. 2) macro_end_arg and macro_end_expand are used to tag all macro-replacement tokens. Tag the tokens are important to my plugin. So macro_start_expand can't be moved to enter_macro_context when I'm sure a macro expansion has occured. To make potential user free resource, macro_end_expand is called even macro is canceled. That's why macro_end_expand is called twice in cpp_get_token_1. If gcc can't accept cpp_token::file_offset field, I can change my plugin stores token linenum other than token file_offset to database, final user should be tolerate with it. Another solution is just like I have done -- compile an independ gcc for symdb only. In 471.tgz, I separate cpp_token::file_offset to gcc.patches/symdb_negotiate_fileoffset. I've attached all new patches on gcc side and ChangeLog, please check it. By the way, have you tried my plugin in previous mail? Is there any problem? Sincerely Yunfeng Zhang
Attachment:
ChangeLog
Description: Binary data
Attachment:
libcpp.patch
Description: Binary data
Attachment:
plugin.patch
Description: Binary data
Attachment:
471.tgz
Description: GNU Zip compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |