This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] handle debug info for global register variables
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 12 Feb 2003 13:54:04 -0800
- Subject: [PATCH] handle debug info for global register variables
- Organization: Tensilica, Inc.
GCC allows global and file-scope variables to be allocated to registers with
an "asm" extension. The resulting stabs entries, however, cause problems for
"objdump --debugging". This patch fixes the problem.
2003-02-12 Bob Wilson <bob.wilson@acm.org>
* debug.c (debug_record_variable): Handle global register variables.
Index: debug.c
===================================================================
RCS file: /cvs/src/src/binutils/debug.c,v
retrieving revision 1.8
diff -c -3 -r1.8 debug.c
*** debug.c 30 Nov 2002 08:39:41 -0000 1.8
--- debug.c 12 Feb 2003 17:36:04 -0000
***************
*** 1191,1201 ****
else
{
if (info->current_block == NULL)
! {
! debug_error (_("debug_record_variable: no current block"));
! return FALSE;
! }
! nsp = &info->current_block->locals;
linkage = DEBUG_LINKAGE_AUTOMATIC;
}
--- 1191,1199 ----
else
{
if (info->current_block == NULL)
! nsp = &info->current_file->globals;
! else
! nsp = &info->current_block->locals;
linkage = DEBUG_LINKAGE_AUTOMATIC;
}