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]

Re: readelf: Remove unused function fetch_location_list()


On 16 Apr 2002, Nick Clifton wrote:

> Hi Guys,
> 
>   I am applying the patch below to remove the unused function
>   fetch_location_list().  This fixes a compile time warning message
>   about the function being defined but not used.

Yeah, I was gonna use it to display location lists inline in the 
debug_info dump (like we do for location expressions) but they are usually 
too big to be useful in the middle of a debug_info  
dump, so i never ended up doing it.
 > 
> Cheers
>         Nick
> 
> 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
> 
> 	* readelf.c (fetch_location_list): Remove unused function.
> 
> Index: binutils/readelf.c
> ===================================================================
> RCS file: /cvs/src/src/binutils/readelf.c,v
> retrieving revision 1.154
> diff -c -3 -p -w -r1.154 readelf.c
> *** binutils/readelf.c	21 Mar 2002 05:00:58 -0000	1.154
> --- binutils/readelf.c	16 Apr 2002 14:57:04 -0000
> *************** static void               free_debug_str
> *** 235,241 ****
>   static const char *       fetch_indirect_string       PARAMS ((unsigned long));
>   static void               load_debug_loc              PARAMS ((FILE *));
>   static void               free_debug_loc              PARAMS ((void));
> - static const char *       fetch_location_list         PARAMS ((unsigned long));
>   static unsigned long      read_leb128                 PARAMS ((unsigned char *, int *, int));
>   static int                process_extended_line_op    PARAMS ((unsigned char *, int, int));
>   static void               reset_state_machine         PARAMS ((int));
> --- 235,240 ----
> *************** free_debug_loc ()
> *** 7241,7258 ****
>     debug_loc_size = 0;
>   }
>   
> - static const char *
> - fetch_location_list (offset)
> -      unsigned long offset;
> - {
> -   if (debug_loc_contents == NULL)
> -     return _("<no .debug_loc section>");
> - 
> -   if (offset > debug_loc_size)
> -     return _("<offset is too big>");
>   
> -   return debug_loc_contents + offset;
> - }
>   static int
>   display_debug_loc (section, start, file)
>        Elf32_Internal_Shdr * section;
> --- 7240,7246 ----
> 


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