This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: dwarf2 error
On 06/02/2011 12:17 AM, naga raj wrote:
Hi Mike,
Please find the attached file which consists of debugging information.
The custom on the GCC mailing list is not to top-post. Please trim your
reply and add comments at the end or interspersed. Again, putting MicroBlaze
in the subject line will help me notice the email.
The readelf and dwarf dumps you attached are long. In the future, please
trim them down to just include the data which is relevant and include in
the body of the email.
>> How are you compiling it?
> I am giving following compiler flags
> -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.20.a
> -mno-xl-soft-mul
Clearly these are not all of the flags you are passing to the compiler.
You are generating Dwarf. What are you specifying to generate debug output?
>> What is the locptr value that you think is incorrect?
> In gdb source gdb/gdb/dwarf2loc.c file find_location_expression function
> It is calculating low/high addresses and comparing them with pc
> if (pc >= low && pc < high)
> {
> *locexpr_length = length;
> return loc_ptr;
> }
What is the locptr value that you think is incorrect? This would be
from the .debug_loc section for the program.
> The same application is working fine with Dwarf3. I have used
> -gdwarf-3 in compilation and now GDN is displaying local variables
> correctly.
What are the differences in the Dwarf output between compiling with
-g and -gdwarf-3? There are some differences in gcc between Dwarf2
and Dwarf3+, but I don't think that they would affect location exprs.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077