From rohitarulraj@gmail.com  Tue Nov  6 08:12:21 2007
From: rohitarulraj@gmail.com (Rohit Arul Raj)
Date: Tue, 6 Nov 2007 13:42:21 +0530
Subject: [Dwarf-Discuss] Help with debug info for fixed-point data types
In-Reply-To: <ba0bd44d0711060009h12ba799cr3d7d0745deffeef3@mail.gmail.com>
References: <ba0bd44d0711060004n2075c012h5866b122c7233d78@mail.gmail.com>
	<ba0bd44d0711060009h12ba799cr3d7d0745deffeef3@mail.gmail.com>
Message-ID: <c356fd4e0711060012n5eff3c32w53bb8684d31e641d@mail.gmail.com>

Hello all,

I have implemented fixed point data types in gcc-4.1.1 by
incorporating the patches sent out in the gcc patches mailing list. To
debug fixed-point types, as per the dwarf manual we may need the
following info as follows.
DW_AT_binary_scale : binary scale factor for fixed-point type.
DW_AT_digit_count : digit count for packed decimal or numeric string type.

For a fixed point data type of format s7.15 how to encode the
information for the format into the following information

Format : s7.15
DW_AT_binary_scale :
DW_AT_digit_count :


Format : s.31
DW_AT_binary_scale :
DW_AT_digit_count :


Any help would be appreciated.

Regards,
Shafi



From ron.brender@charter.net  Tue Nov  6 13:14:15 2007
From: ron.brender@charter.net (Ron Brender)
Date: Tue, 06 Nov 2007 08:14:15 -0500
Subject: [Dwarf-Discuss] Help with debug info for fixed-point data types
In-Reply-To: <c356fd4e0711060012n5eff3c32w53bb8684d31e641d@mail.gmail.com>
References: <ba0bd44d0711060004n2075c012h5866b122c7233d78@mail.gmail.com>	<ba0bd44d0711060009h12ba799cr3d7d0745deffeef3@mail.gmail.com>
	<c356fd4e0711060012n5eff3c32w53bb8684d31e641d@mail.gmail.com>
Message-ID: <473068A7.1000703@charter.net>

Shafi,

I don't understand--is there a question here? What do you need help with?

I assume you have the DWARF V3 Standard of December 2005, right?
If there is a question about how to interpret the DWARF standard, this 
list can help. If there is a question about patches to support fixed 
point in gdb, this list is not a good resource.

Ron

p.s. For binary fixed point I would not expect you to need 
DW_AT_digit_count at all. That is only relevant for numeric string and 
packed decimal types.

---------------------
Rohit Arul Raj wrote:
> Hello all,
> 
> I have implemented fixed point data types in gcc-4.1.1 by
> incorporating the patches sent out in the gcc patches mailing list. To
> debug fixed-point types, as per the dwarf manual we may need the
> following info as follows.
> DW_AT_binary_scale : binary scale factor for fixed-point type.
> DW_AT_digit_count : digit count for packed decimal or numeric string type.
> 
> For a fixed point data type of format s7.15 how to encode the
> information for the format into the following information
> 
> Format : s7.15
> DW_AT_binary_scale :
> DW_AT_digit_count :
> 
> 
> Format : s.31
> DW_AT_binary_scale :
> DW_AT_digit_count :
> 
> 
> Any help would be appreciated.
> 
> Regards,
> Shafi





From rohitarulraj@gmail.com  Tue Nov  6 13:28:00 2007
From: rohitarulraj@gmail.com (Rohit Arul Raj)
Date: Tue, 6 Nov 2007 18:58:00 +0530
Subject: [Dwarf-Discuss] Help with debug info for fixed-point data types
In-Reply-To: <473068A7.1000703@charter.net>
References: <ba0bd44d0711060004n2075c012h5866b122c7233d78@mail.gmail.com>
	<ba0bd44d0711060009h12ba799cr3d7d0745deffeef3@mail.gmail.com>
	<c356fd4e0711060012n5eff3c32w53bb8684d31e641d@mail.gmail.com>
	<473068A7.1000703@charter.net>
Message-ID: <c356fd4e0711060528w30f3ab6tdbc9ce1bf039ce8a@mail.gmail.com>

Hi Ron,

>From the debug information generated, i need to differentiate between
different fixed point types that have same size.
For e.g. the following data types long fract (S.39) and accum (S7.31)
have same size (8 bytes).

Is there any way to find out from the debug information which type it
is if their sizes are same?

>From the manual, i assumed that DW_AT_binary_scale ,DW_AT_digit_count
can be used for this purpose. But i was not sure how to encode this
information.

Can you suggest any way to overcome this issue?

Regards,
Shafi

On Nov 6, 2007 6:44 PM, Ron Brender <ron.brender at charter.net> wrote:
> Shafi,
>
> I don't understand--is there a question here? What do you need help with?
>
> I assume you have the DWARF V3 Standard of December 2005, right?
> If there is a question about how to interpret the DWARF standard, this
> list can help. If there is a question about patches to support fixed
> point in gdb, this list is not a good resource.
>
> Ron
>
> p.s. For binary fixed point I would not expect you to need
> DW_AT_digit_count at all. That is only relevant for numeric string and
> packed decimal types.
>
> ---------------------
>
> Rohit Arul Raj wrote:
> > Hello all,
> >
> > I have implemented fixed point data types in gcc-4.1.1 by
> > incorporating the patches sent out in the gcc patches mailing list. To
> > debug fixed-point types, as per the dwarf manual we may need the
> > following info as follows.
> > DW_AT_binary_scale : binary scale factor for fixed-point type.
> > DW_AT_digit_count : digit count for packed decimal or numeric string type.
> >
> > For a fixed point data type of format s7.15 how to encode the
> > information for the format into the following information
> >
> > Format : s7.15
> > DW_AT_binary_scale :
> > DW_AT_digit_count :
> >
> >
> > Format : s.31
> > DW_AT_binary_scale :
> > DW_AT_digit_count :
> >
> >
> > Any help would be appreciated.
> >
> > Regards,
> > Shafi
>
>
>



From paul.t.robinson@hp.com  Tue Nov  6 16:05:03 2007
From: paul.t.robinson@hp.com (Robinson, Paul T NonStop)
Date: Tue, 6 Nov 2007 16:05:03 -0000
Subject: [Dwarf-Discuss] Help with debug info for fixed-point data types
In-Reply-To: <c356fd4e0711060528w30f3ab6tdbc9ce1bf039ce8a@mail.gmail.com>
References: <ba0bd44d0711060004n2075c012h5866b122c7233d78@mail.gmail.com><ba0bd44d0711060009h12ba799cr3d7d0745deffeef3@mail.gmail.com><c356fd4e0711060012n5eff3c32w53bb8684d31e641d@mail.gmail.com><473068A7.1000703@charter.net>
	<c356fd4e0711060528w30f3ab6tdbc9ce1bf039ce8a@mail.gmail.com>
Message-ID: <44722091F2AC5F4197CF0EEC810137E102F02B25@G3W0066.americas.hpqcorp.net>

Shafi,

I'm not familiar with "long fract (S.39) and accum (S7.31)" but since
you say they both are 8 bytes I assume those are bit counts; long fract
is a 39-bit signed fractional part, accum is a signed value with 7 bits
of integer part and 31 bits of fractional part.  In that case I'd expect
to see long fract with DW_AT_binary_scale = -39 and accum with 
DW_AT_binary_scale = -31.

Certainly the DW_AT_binary_scale or DW_AT_decimal_scale attributes
should be considered as part of the type, as they provide information
about how to interpret the content of the data item (as opposed to
other attributes that, say, tell you where to find the data item).
If you were going to do something like assign a long fract value to an
accum item, you would need to compensate for the different scales.

--paulr


-----Original Message-----
From: dwarf-discuss-bounces@lists.dwarfstd.org
[mailto:dwarf-discuss-bounces at lists.dwarfstd.org] On Behalf Of Rohit
Arul Raj
Sent: Tuesday, November 06, 2007 5:28 AM
To: Ron Brender
Cc: dwarf-discuss at lists.dwarfstd.org
Subject: Re: [Dwarf-Discuss] Help with debug info for fixed-point data
types

Hi Ron,

>From the debug information generated, i need to differentiate between
different fixed point types that have same size.
For e.g. the following data types long fract (S.39) and accum (S7.31)
have same size (8 bytes).

Is there any way to find out from the debug information which type it
is if their sizes are same?

>From the manual, i assumed that DW_AT_binary_scale ,DW_AT_digit_count
can be used for this purpose. But i was not sure how to encode this
information.

Can you suggest any way to overcome this issue?

Regards,
Shafi

On Nov 6, 2007 6:44 PM, Ron Brender <ron.brender at charter.net> wrote:
> Shafi,
>
> I don't understand--is there a question here? What do you need help
with?
>
> I assume you have the DWARF V3 Standard of December 2005, right?
> If there is a question about how to interpret the DWARF standard, this
> list can help. If there is a question about patches to support fixed
> point in gdb, this list is not a good resource.
>
> Ron
>
> p.s. For binary fixed point I would not expect you to need
> DW_AT_digit_count at all. That is only relevant for numeric string and
> packed decimal types.
>
> ---------------------
>
> Rohit Arul Raj wrote:
> > Hello all,
> >
> > I have implemented fixed point data types in gcc-4.1.1 by
> > incorporating the patches sent out in the gcc patches mailing list.
To
> > debug fixed-point types, as per the dwarf manual we may need the
> > following info as follows.
> > DW_AT_binary_scale : binary scale factor for fixed-point type.
> > DW_AT_digit_count : digit count for packed decimal or numeric string
type.
> >
> > For a fixed point data type of format s7.15 how to encode the
> > information for the format into the following information
> >
> > Format : s7.15
> > DW_AT_binary_scale :
> > DW_AT_digit_count :
> >
> >
> > Format : s.31
> > DW_AT_binary_scale :
> > DW_AT_digit_count :
> >
> >
> > Any help would be appreciated.
> >
> > Regards,
> > Shafi
>
>
>
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss at lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org



From dwarf@pedriana.com  Thu Nov 29 04:33:46 2007
From: dwarf@pedriana.com (Paul)
Date: Wed, 28 Nov 2007 20:33:46 -0800
Subject: [Dwarf-Discuss] How do I detect the end of a sibling chain?
Message-ID: <474E412A.9040600@pedriana.com>

The DWARF 3 Standard says that "A chain of sibling entries is terminated 
by a null entry." But nowhere in the document is a "null entry" defined. 
I searched the discussion history and can see that other people have had 
problems similar to me, but I can see no definitive answer. I am walking 
through DIEs and need to know when the next entry is a child or a 
parent. It's easy to tell if the next is a child, but I can see no way 
to tell if the next entry is a parent. Please note that I am not an 
expert on DWARF and so any terminology you give may be obvious to you 
but not to me. I have only the written Standard document to go by and 
not years of experience with this stuff.

Thanks.







From brian.nettleton@windriver.com  Thu Nov 29 04:47:12 2007
From: brian.nettleton@windriver.com (Nettleton, Brian)
Date: Wed, 28 Nov 2007 20:47:12 -0800
Subject: [Dwarf-Discuss] How do I detect the end of a sibling chain?
In-Reply-To: <474E412A.9040600@pedriana.com>
References: <474E412A.9040600@pedriana.com>
Message-ID: <EBFDFFB87BB22F4AB1B801A86BB41BC70254115A@ala-mail02.corp.ad.wrs.com>

>From Section 7.5.2 "Debugging Information Entry":

"Debugging information entries consisting of only the abbreviation code
0 are considered null entries."


It's simply a one byte entry containing a zero. 

It is somewhat awkward that the low level details of the debugging
entries are in chapter 7, but once you get used to looking there
whenever something seems to be missing it isn't too bad.

-Brian Nettleton
Senior Technical Staff Member
Wind River Systems


-----Original Message-----
From: dwarf-discuss-bounces@lists.dwarfstd.org
[mailto:dwarf-discuss-bounces at lists.dwarfstd.org] On Behalf Of Paul
Sent: Wednesday, November 28, 2007 8:34 PM
To: dwarf-discuss at lists.dwarfstd.org
Subject: [Dwarf-Discuss] How do I detect the end of a sibling chain?

The DWARF 3 Standard says that "A chain of sibling entries is terminated
by a null entry." But nowhere in the document is a "null entry" defined.

I searched the discussion history and can see that other people have had
problems similar to me, but I can see no definitive answer. I am walking
through DIEs and need to know when the next entry is a child or a
parent. It's easy to tell if the next is a child, but I can see no way
to tell if the next entry is a parent. Please note that I am not an
expert on DWARF and so any terminology you give may be obvious to you
but not to me. I have only the written Standard document to go by and
not years of experience with this stuff.

Thanks.




_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss at lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org



