This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

[PATCH] handle debug info for global register variables


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;
      }
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]