public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/44712] New: Debug info for partially inlined functions Date: Tue, 29 Jun 2010 12:58:00 -0000 [thread overview] Message-ID: <bug-44712-87@http.gcc.gnu.org/bugzilla/> (raw) /* { dg-options "-g -O2" } */ extern void abort (void); extern void exit (int); extern int printf (const char *, ...); static int foo (int x) { typedef int T; T z = 2 * x; if (x <= 0) { printf ("foo\n"); printf ("foo\n"); printf ("foo\n"); exit (0); } return 6; } __attribute__((noinline)) int bar (int x) { return foo (x) + foo (6) + foo (x); } int main (void) { int l; asm volatile ("" : "=r" (l) : "0" (5)); if (bar (l) != 18) abort (); bar (l - 10); abort (); } Debugging experience on this testcase isn't ideal, work will be needed both on the gcc side and gdb side. Roland has some ideas what should be done, certainly DW_AT_artificial should be set on the foo.part* function, and perhaps it should have some DW_TAG_lexical_block from the abstract DW_TAG_subprogram as DW_AT_abstract_origin instead of the whole DW_TAG_subroutine (or perhaps some artificial DW_TAG_lexical_block created just for that purpose?). I'll let Roland write the details here himself. -- Summary: Debug info for partially inlined functions Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44712
next reply other threads:[~2010-06-29 12:58 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-29 12:58 jakub at gcc dot gnu dot org [this message] 2010-06-29 13:25 ` [Bug debug/44712] " hubicka at ucw dot cz 2010-06-29 13:25 ` [Bug debug/44712] New: " Jan Hubicka 2010-07-01 18:56 ` [Bug debug/44712] " roland at redhat dot com
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-44712-87@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).