Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Jonas Maebe
Subject: [Commit] gdb/pascal language 2 or 4 byte char support in strings
Date: 10 Feb 2009, 15:31:55
On 10 Feb 2009, at 01:15, Pierre Muller wrote: > I committed the patch below to add > support for fixed width chars > greater than 1 for pascal language. > > This works nicely for Free Pascal, > I couldn't test it for GPC > because I didn't find out if those kind of > char are supported... Hi Pierre, A while ago I wrote a similar patch. I didn't submit it yet because I didn't find time to write explanations why I did everything and on writing test cases for all changes. Anyway, it's in attachment (it's against the p-*.c files before your patch though). Some comments: * pascal-dwarf-char.patch: This one is independent from and complementary to your patch : it properly sets the TYPE_CODE DW_ATE_signed_char/DW_ATE_unsigned_char to TYPE_CODE_CHAR in case of Pascal (rather than only for Ada and Modula-2) * pascalchar.patch: a) I removed all situations in the Pascal string handling where "TYPE_CODE (elttype) == TYPE_CODE_INT" is interpreted as a character. I don't know the original reason for having it there though, but maybe it was because of the lack of a)? At least the stabs debug info of both FPC and GPC results in a char (negative type number -2, as mentioned at http://sourceware.org/gdb/current/onlinedocs/stabs_5.html#SEC35) , which gdb turns into a TYPE_CODE_CHAR. I don't know about GPC and Dwarf, but FPC and Dwarf results in DW_ATE_unsigned_char. The main problem with considering TYPE_CODE_INT as characters is that arrays of bytes (and now presumably also of words and cardinals) are printed as character arrays, which is quite annoying. b) my changes to p-lang.c were basically a copy/paste if all changes in the C version of print_string to support characters of different widths I noticed that I did miss this change you did to p-valprint.c in your patch: - (valaddr + embedded_offset)[temp_len] + extract_unsigned_integer (valaddr + embedded_offset + + temp_len * eltlen, eltlen) The patches are against the gdb archer branch, but applied cleanly against trunk gdb cvs when I tried it last month. Sorry for not informing you earlier about this patch. Jonas
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Pierre Muller | [Commit] gdb/pascal language 2 or 4 byte char support in strings | 10 Feb 2009, 15:59:27 |
| Author | Subject | Date |
|---|---|---|
| Pierre Muller | [Commit] gdb/pascal language 2 or 4 byte char support in strings | 10 Feb 2009, 01:15:10 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).