public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "masami.hiramatsu.pt at hitachi dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/54793] New: the location of a formal_parameter is not started from a function entry with -mfentry Date: Wed, 03 Oct 2012 13:10:00 -0000 [thread overview] Message-ID: <bug-54793-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793 Bug #: 54793 Summary: the location of a formal_parameter is not started from a function entry with -mfentry Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned@gcc.gnu.org ReportedBy: masami.hiramatsu.pt@hitachi.com With -mfentry, GCC (I've found this with Red Hat 4.7.0-5 and Red Hat 4.7.2-2 on Fedora 17) generates odd debuginfo about variable locations. Here are examples: ----- <1><9a58>: Abbrev Number: 86 (DW_TAG_subprogram) <9a59> DW_AT_external : 1 <9a59> DW_AT_name : (indirect string, offset: 0xd82): unregister_di e_notifier <9a5d> DW_AT_decl_file : 1 <9a5e> DW_AT_decl_line : 551 <9a60> DW_AT_prototyped : 1 <9a60> DW_AT_type : <0x7c> <9a64> DW_AT_low_pc : 0x740 <9a6c> DW_AT_high_pc : 0x75a <9a74> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <9a76> DW_AT_GNU_all_call_sites: 1 <9a76> DW_AT_sibling : <0x9aac> <2><9a7a>: Abbrev Number: 87 (DW_TAG_formal_parameter) <9a7b> DW_AT_name : nb <9a7e> DW_AT_decl_file : 1 <9a7f> DW_AT_decl_line : 551 <9a81> DW_AT_type : <0x2a96> <9a85> DW_AT_location : 0x172f (location list) ... 0000172f 0000000000000745 0000000000000750 (DW_OP_reg5 (rdi)) 0000172f 0000000000000750 0000000000000757 (DW_OP_reg4 (rsi)) 0000172f 0000000000000757 000000000000075a (DW_OP_GNU_entry_value: (DW_OP_reg5 (rdi)); DW_OP_stack_value) 0000172f <End of list> ----- As you can see, the location of the parameter "nb", starts from 0x745 but unregister_die_notifier() function itself starts from 0x740. ----- <1><9aac>: Abbrev Number: 86 (DW_TAG_subprogram) <9aad> DW_AT_external : 1 <9aad> DW_AT_name : (indirect string, offset: 0x321f): notify_die <9ab1> DW_AT_decl_file : 1 <9ab2> DW_AT_decl_line : 530 <9ab4> DW_AT_prototyped : 1 <9ab4> DW_AT_type : <0x7c> <9ab8> DW_AT_low_pc : 0xb0 <9ac0> DW_AT_high_pc : 0xe0 <9ac8> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <9aca> DW_AT_GNU_all_call_sites: 1 <9aca> DW_AT_sibling : <0x9b6c> <2><9ace>: Abbrev Number: 87 (DW_TAG_formal_parameter) <9acf> DW_AT_name : val <9ad3> DW_AT_decl_file : 1 <9ad4> DW_AT_decl_line : 530 <9ad6> DW_AT_type : <0x2b36> <9ada> DW_AT_location : 0x177b (location list) ... 0000177b 00000000000000b0 00000000000000cd (DW_OP_reg5 (rdi)) 0000177b 00000000000000cd 00000000000000dd (DW_OP_reg4 (rsi)) 0000177b 00000000000000dd 00000000000000e0 (DW_OP_GNU_entry_value: (DW_OP_reg5 (rdi)); DW_OP_stack_value) 0000177b <End of list> ----- However, without fentry call (notifiy_die is marked notrace), the parameter "val" location start with 0xb0, which is same as notify_die start address. URL: https://lkml.org/lkml/2012/10/3/187
next reply other threads:[~2012-10-03 13:10 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-03 13:10 masami.hiramatsu.pt at hitachi dot com [this message] 2012-10-03 13:49 ` [Bug debug/54793] " jakub at gcc dot gnu.org 2012-10-03 14:12 ` jakub at gcc dot gnu.org 2013-01-18 16:02 ` fche at redhat dot com 2013-01-24 19:12 ` aoliva at gcc dot gnu.org 2013-01-25 9:08 ` jakub at gcc dot gnu.org 2013-01-25 9:35 ` jakub at gcc dot gnu.org 2013-02-01 16:55 ` jakub at gcc dot gnu.org 2013-12-21 17:06 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-54793-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).