logo       

Re: backtrace/2024: backtrace fails when function ends with call to abort: msg#00008

Subject: Re: backtrace/2024: backtrace fails when function ends with call to abort
The following reply was made to PR backtrace/2024; it has been noted by GNATS.

From: James E Wilson <wilson@xxxxxxxxxxxxx>
To: Daniel Jacobowitz <drow@xxxxxxxxx>
Cc: gdb-gnats@xxxxxxxxxxxxxxxxxx
Subject: Re: backtrace/2024: backtrace fails when function ends with call
        to abort
Date: 01 Nov 2005 16:39:59 -0800

 --=-6RT2XoIijifY7DF76Wjw
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 
 On Tue, 2005-11-01 at 15:32, Daniel Jacobowitz wrote:
 > GDB already has a concept of "frame unwind address".  This is probably
 > as simple as changing get_frame_pc to get_frame_address_in_block in
 > dwarf2loc.c, right before that error message is produced.  Want to try
 > that?
 
 Yes, that appears to be exactly what I am looking for.  There are two
 uses of get_frame_pc in dwarf2loc.c.  Only the first one needs to be
 fixed to make this testcase work, but they both should be fixed.  With
 this patch, the testcase works.  On an x86_64 linux system, I am now
 getting
 (gdb) bt
 #0  0x0000002a9569b9a0 in abort () from /lib64/tls/libc.so.6
 #1  0x00000000004004dc in main (argc=1, argv=0x7fbfffeeb8) at tmp.c:4
 which is much better.  It is still printing the return address (4004dc)
 which is past the end of the function, but I suppose that is OK if it is
 understood that this is supposed to be a return address, in which case
 it is correct.  In any case, the arguments are now printed which is the
 important part.
 
 I haven't run the gdb testsuite yet.  My machine is currently busy doing
 a gcc bootstrap to test a gcc patch.  I will run the gdb testsuite when
 that is done.
 
 --=-6RT2XoIijifY7DF76Wjw
 Content-Disposition: attachment; filename=patch.frame.address
 Content-Type: text/plain; name=patch.frame.address; charset=utf-8
 Content-Transfer-Encoding: 7bit
 
 2005-11-01  James E Wilson  <wilson@xxxxxxxxxxxx>
 
        * dwarf2loc.c (dwarf_expr_frame_base): Use get_frame_address_in_block
        instead of get_frame_pc.
        (loclist_read_variable): Likewise.
 
 Index: dwarf2loc.c
 ===================================================================
 RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
 retrieving revision 1.29
 diff -p -p -r1.29 dwarf2loc.c
 *** dwarf2loc.c        12 Jul 2005 13:06:54 -0000      1.29
 --- dwarf2loc.c        2 Nov 2005 00:13:36 -0000
 *************** dwarf_expr_frame_base (void *baton, gdb_
 *** 165,172 ****
       {
         struct dwarf2_loclist_baton *symbaton;
         symbaton = SYMBOL_LOCATION_BATON (framefunc);
 !       *start = find_location_expression (symbaton, length,
 !                                       get_frame_pc (debaton->frame));
       }
     else
       {
 --- 165,173 ----
       {
         struct dwarf2_loclist_baton *symbaton;
         symbaton = SYMBOL_LOCATION_BATON (framefunc);
 !       *start
 !      = find_location_expression (symbaton, length,
 !                                  get_frame_address_in_block 
(debaton->frame));
       }
     else
       {
 *************** loclist_read_variable (struct symbol *sy
 *** 580,586 ****
     size_t size;
   
     data = find_location_expression (dlbaton, &size,
 !                                 frame ? get_frame_pc (frame) : 0);
     if (data == NULL)
       {
         val = allocate_value (SYMBOL_TYPE (symbol));
 --- 581,588 ----
     size_t size;
   
     data = find_location_expression (dlbaton, &size,
 !                                 frame ? get_frame_address_in_block (frame)
 !                                 : 0);
     if (data == NULL)
       {
         val = allocate_value (SYMBOL_TYPE (symbol));
 
 --=-6RT2XoIijifY7DF76Wjw--
 
 



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe