List Info

Thread: RE: error message : I'm sorry, Dave, I can't dothat.Symbolformat'elf32-xc16x' unknown.




RE: error message : I'm sorry, Dave, I can't dothat.Symbolformat'elf32-xc16x' unknown.
country flaguser name
United States
2007-09-27 08:44:59

Hi Daniel,

	   The change had worked fine. Now gdb is working without 
"--disable-nls" switch.

However One more question just for little more information
---

I changed find_sym_fns() in gdb/symfile.c as to print the
value for
which file formats gdb has the support as follows.

static struct sym_fns *
find_sym_fns (bfd *abfd)
{
  struct sym_fns *sf;
  enum bfd_flavour our_flavour = bfd_get_flavour (abfd);
  enum bfd_flavour test_flavour;

  if (our_flavour == bfd_target_srec_flavour
      || our_flavour == bfd_target_ihex_flavour
      || our_flavour == bfd_target_tekhex_flavour)
    return NULL;	/* No symbols.  */

  for (sf = symtab_fns; sf != NULL; sf = sf->next)
  {
	  test_flavour = sf->sym_flavour; /* added line*/
	  printf_unfiltered (_("sys_flavour %d.. our flavour 
%d...n"),
test_flavour,our_flavour);     /* added line*/
      if (our_flavour == sf->sym_flavour)
      return sf;
  }
  error (_("I'm sorry, Dave, I can't do that.  Symbol
format `%s'
unknown."),
	 bfd_get_target (abfd));
}


This time I got following output :

This GDB was configured as "--host=i686-pc-cygwin
--target=xc16x-elf"...
sys_flavour 3.. our flavour  5...
sys_flavour 2.. our flavour  5...
sys_flavour 1.. our flavour  5...
sys_flavour 5.. our flavour  5...
sys_flavour 3.. our flavour  5...
sys_flavour 2.. our flavour  5...
sys_flavour 1.. our flavour  5...
sys_flavour 5.. our flavour  5...


my question is why the for loop has executed 2 times ? 
I mean to say once it has found 
"(our flavour== sf->sym_flavour)" and returning
"sf" for 1st time again
the loop is executed one more time to return the same. 
 

--Bhushan Attarde



-----Original Message-----
From: Daniel Jacobowitz [mailto:drowfalse.org] 
Sent: Thursday, September 27, 2007 6:14 PM
To: Bhushan Attarde
Cc: gdbsourceware.org
Subject: Re: error message : I'm sorry, Dave, I can't
dothat.Symbolformat'elf32-xc16x' unknown.

On Thu, Sep 27, 2007 at 06:03:31PM +0530, Bhushan Attarde
wrote:
> 1.There were some undefined references to
`_libintl_dgettext'
> 
> /* this is the part of gdb/config.log file */
> 
> configure:21854: checking for ELF support in BFD
> configure:21878: i686-pc-cygwin-gcc -o conftest.exe
-Os
>
-I/cygdrive/c/cyggdb/src/gdb-6.7.50_20070918/gdb/../include
-I../bfd
> -I/cygdrive/c/cyggdb/src/gdb-6.7.50_20070918/gdb/../bfd
  -L../bfd
> -L../libiberty conftest.c -lncurses -lm  -lbfd -liberty
>&5
> ../bfd/libbfd.a(elf.o):elf.c:(.text+0x4d9): undefined
reference to
> `_libintl_dgettext'

Aha!

This means the configure check is buggy.  What happens if
you replace
this line:
  LIBS="$LIBS -lbfd -liberty"
with this:
  LIBS="$LIBS -lbfd -liberty $LIBINTL"

-- 
Daniel Jacobowitz
CodeSourcery

Re: error message : I'm sorry, Dave, I can't dothat.Symbolformat'elf32-xc16x' unknown.
country flaguser name
United States
2007-09-27 08:49:29
On Thu, Sep 27, 2007 at 07:14:59PM +0530, Bhushan Attarde
wrote:
> my question is why the for loop has executed 2 times ?

> I mean to say once it has found 
> "(our flavour== sf->sym_flavour)" and
returning "sf" for 1st time again
> the loop is executed one more time to return the same.


Use GDB to answer this question, of course.  Set a
breakpoint on
find_syms_fn and backtrace every time it's hit.

-- 
Daniel Jacobowitz
CodeSourcery

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )