Xtensa port

Maxim Grigoriev maxim@tensilica.com
Fri Sep 22 23:59:00 GMT 2006


Hi Jim,
> I haven't looked at the code closely, but I have a few questions.
>
> - Where does xtensa-config.h come from?
>   
It's been already submitted as a part of Xtensa BFD. It comes from
/cvs/src/src/include/xtensa-config.h
> - Does xtensa-config.c need to be listed in ALLDEPFILES as well?
>   
You're right, thank you. I modified Makefile.in. So it will be reflected 
in the corrected patch I send after all the suggestions are handled 
properly.
> - I don't see anything that actually plugs in xtensa-linux-tdep.o.
>   Should that be kept out until the linux target is ready?
>   
I don't know. I was thinking in advance. The next update is supposed to 
be submitted shortly after the first one.
> - In your DejaGnu config files, there is a way to tell GDB not to run
>   tests that depend on the inferior being able to do I/O; this is used
>   to run the tests against embedded systems that don't implement the
>   semi-hosting protocol packets, like yours.  Look for uses of
>   'gdb_skip_stdio_test'.
>   
Some of the functionality covered in "stdio.h" is implemented on the 
level of FILEIO protocol, which I treat as a subset of GDB remote 
protocol. Tensilica OCD daemon supports FILEIO. And, I introduced a 
target library, which, when linked with a stand-alone Xtensa program, 
allows to use FILEIO through OCD. So I think using "gdb_skip_stdio_test" 
would be too restrictive.
> - Can you explain more about the differences between the
>   Xtensa-generated DWARF and what GDB expects?  Ideally, GDB should
>   accept DWARF from any compiler, but because DWARF is so flexible
>   it's easy for inappropriate expectations to creep in.
>   
In most such cases, I'd treat Tensilica compiler misbehavior as a bug. 
As a matter of fact, many of these cases are already filed as "Problem 
Reports" against compiler in Tensilica GNUTS. Examples:

1) Wrong line-number information for multi-line source code:
1:if (a
2: && b
3: && c)
the debugging information for the if-clause points to line 3 in XCC.

2) Sometimes, Tensilica compiler drops type qualifiers, such as volatile 
and const.

3) In some cases, typedef'd types have no debugging information. Example:

typedef int t_int;
int main(void) { return 0; }

4) When the program is compiled with "-O2 -g", there are issues with 
scoping for variables;

5) Tensilica compiler does not always add a file information in the 
debugging information;

There is more stuff like this, but this is all about our compiler, which 
is probably not interesting for the GDB community.

I hope I answered your questions.

-- Maxim










More information about the Gdb-patches mailing list