public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
       [not found] <bug-11492-4717@http.sourceware.org/bugzilla/>
@ 2014-09-12 22:01 ` sergiodj at redhat dot com
  2015-04-21 20:41 ` muller at sourceware dot org
  1 sibling, 0 replies; 10+ messages in thread
From: sergiodj at redhat dot com @ 2014-09-12 22:01 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=11492

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at redhat dot com

--- Comment #9 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
Has this problem been fixed already?  Can we close the bug?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
       [not found] <bug-11492-4717@http.sourceware.org/bugzilla/>
  2014-09-12 22:01 ` [Bug pascal/11492] Patch to print (pascal) arrays of integer right sergiodj at redhat dot com
@ 2015-04-21 20:41 ` muller at sourceware dot org
  1 sibling, 0 replies; 10+ messages in thread
From: muller at sourceware dot org @ 2015-04-21 20:41 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=11492

Pierre Muller <muller at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Pierre Muller <muller at sourceware dot org> ---
Patch in comments should have fixed the issue reported

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
                   ` (6 preceding siblings ...)
  2010-05-12 12:47 ` muller at ics dot u-strasbg dot fr
@ 2010-05-15 20:47 ` jan dot kratochvil at redhat dot com
  7 siblings, 0 replies; 10+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-05-15 20:47 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan dot kratochvil at redhat
                   |                            |dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
                   ` (5 preceding siblings ...)
  2010-05-08 15:20 ` muller at ics dot u-strasbg dot fr
@ 2010-05-12 12:47 ` muller at ics dot u-strasbg dot fr
  2010-05-15 20:47 ` jan dot kratochvil at redhat dot com
  7 siblings, 0 replies; 10+ messages in thread
From: muller at ics dot u-strasbg dot fr @ 2010-05-12 12:47 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From muller at ics dot u-strasbg dot fr  2010-05-12 12:47 -------
*** Bug 11591 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |broken dot zhou at gmail dot
                   |                            |com


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
                   ` (4 preceding siblings ...)
  2010-04-13 10:43 ` joost at cnoc dot nl
@ 2010-05-08 15:20 ` muller at ics dot u-strasbg dot fr
  2010-05-12 12:47 ` muller at ics dot u-strasbg dot fr
  2010-05-15 20:47 ` jan dot kratochvil at redhat dot com
  7 siblings, 0 replies; 10+ messages in thread
From: muller at ics dot u-strasbg dot fr @ 2010-05-08 15:20 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2010-04-21 09:55 -------
Subject: Bug 11492

CVSROOT:	/cvs/src
Module name:	src
Changes by:	muller@sourceware.org	2010-04-21 09:54:59

Modified files:
	gdb            : ChangeLog p-valprint.c 
	gdb/testsuite  : ChangeLog 
Added files:
	gdb/testsuite/gdb.pascal: gdb11492.exp gdb11492.pas 

Log message:
	gdb ChangeLog
	PR pascal/11492.
	* p-valprint.c (pascal_val_print): Fix default printing of integer
	arrays.
	
	gdb/testsuite ChangeLog
	PR pascal/11492.
	* gdb.pascal/gdb11492.pas: New file.
	* gdb.pascal/gdb11492.exp: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11659&r2=1.11660
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/p-valprint.c.diff?cvsroot=src&r1=1.68&r2=1.69
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2244&r2=1.2245
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.pascal/gdb11492.exp.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.pascal/gdb11492.pas.diff?cvsroot=src&r1=NONE&r2=1.1


------- Additional Comments From muller at ics dot u-strasbg dot fr  2010-05-08 15:20 -------
  The patches above should have fixed the problem
reported here.
  Could you please try cvs GDB out and 
confirm that it is fixed?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
                   ` (3 preceding siblings ...)
  2010-04-13  9:24 ` muller at ics dot u-strasbg dot fr
@ 2010-04-13 10:43 ` joost at cnoc dot nl
  2010-05-08 15:20 ` muller at ics dot u-strasbg dot fr
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: joost at cnoc dot nl @ 2010-04-13 10:43 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From joost at cnoc dot nl  2010-04-13 10:43 -------
(In reply to comment #4)
>   Please tell me if this patch is OK for you also.

Even better

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
                   ` (2 preceding siblings ...)
  2010-04-13  8:16 ` muller at ics dot u-strasbg dot fr
@ 2010-04-13  9:24 ` muller at ics dot u-strasbg dot fr
  2010-04-13 10:43 ` joost at cnoc dot nl
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: muller at ics dot u-strasbg dot fr @ 2010-04-13  9:24 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From muller at ics dot u-strasbg dot fr  2010-04-13 09:24 -------
I agree with your bug report but not with the proposed patch,
instead I propose this:

  The main difference is the the use of /s print format
modifier will force the printing as a string, regardless of the
element type.
 
  Please tell me if this patch is OK for you also.

Pierre Muller
Pascal language maintainer of GDB.

Index: p-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-valprint.c,v
retrieving revision 1.68
diff -u -p -r1.68 p-valprint.c
--- p-valprint.c        9 Mar 2010 08:30:54 -0000       1.68
+++ p-valprint.c        13 Apr 2010 09:19:55 -0000
@@ -80,12 +80,13 @@ pascal_val_print (struct type *type, con
            {
              print_spaces_filtered (2 + 2 * recurse, stream);
            }
-         /* For an array of chars, print with string syntax.  */
-         if ((eltlen == 1 || eltlen == 2 || eltlen == 4)
-             && ((TYPE_CODE (elttype) == TYPE_CODE_INT)
-              || ((current_language->la_language == language_pascal)
-                  && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
-             && (options->format == 0 || options->format == 's'))
+         /* If 's' format is used, try to print out as string.
+            If no format is given, print as string if element type
+            is of TYPE_CODE_CHAR and element size is 1,2 or 4.  */
+         if (options->format == 's'
+             || ((eltlen == 1 || eltlen == 2 || eltlen == 4)
+                 && TYPE_CODE (elttype) == TYPE_CODE_CHAR
+                 && options->format == 0))
            {
              /* If requested, look for the first null char and only print
                 elements up to it.  */

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|7.1                         |7.2


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
  2010-04-12 22:37 ` [Bug pascal/11492] " sergiodj at redhat dot com
  2010-04-13  7:53 ` joost at cnoc dot nl
@ 2010-04-13  8:16 ` muller at ics dot u-strasbg dot fr
  2010-04-13  9:24 ` muller at ics dot u-strasbg dot fr
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: muller at ics dot u-strasbg dot fr @ 2010-04-13  8:16 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From muller at ics dot u-strasbg dot fr  2010-04-13 08:16 -------
  Assignment changed to me as this is pascal specific.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|muller at sourceware dot org
                   |org                         |
             Status|UNCONFIRMED                 |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
  2010-04-12 22:37 ` [Bug pascal/11492] " sergiodj at redhat dot com
@ 2010-04-13  7:53 ` joost at cnoc dot nl
  2010-04-13  8:16 ` muller at ics dot u-strasbg dot fr
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: joost at cnoc dot nl @ 2010-04-13  7:53 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From joost at cnoc dot nl  2010-04-13 07:53 -------
Hello Sergio,

Thanks for the suggestion, but I deliberately submitter it here. This patch is
part of a larger array patch which I've send to archer, but as it is
pascal-specific the archer-people do not know much of this. And this part of the
patch is not archer-specific. So I posted it here so that the gnu-gdb-pascal
maintainer can have a look at it. 

Thanks,

Joost.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug pascal/11492] Patch to print (pascal) arrays of integer right
  2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
@ 2010-04-12 22:37 ` sergiodj at redhat dot com
  2010-04-13  7:53 ` joost at cnoc dot nl
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: sergiodj at redhat dot com @ 2010-04-12 22:37 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From sergiodj at redhat dot com  2010-04-12 22:37 -------
Hello Joost,

Given that your bug is filed under the `archer' version, have you considered
submiting your patch to the archer mailing-list?  It's a better way to get your
patch reviewed.

Thanks.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11492

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-21 20:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11492-4717@http.sourceware.org/bugzilla/>
2014-09-12 22:01 ` [Bug pascal/11492] Patch to print (pascal) arrays of integer right sergiodj at redhat dot com
2015-04-21 20:41 ` muller at sourceware dot org
2010-04-12 19:58 [Bug pascal/11492] New: " joost at cnoc dot nl
2010-04-12 22:37 ` [Bug pascal/11492] " sergiodj at redhat dot com
2010-04-13  7:53 ` joost at cnoc dot nl
2010-04-13  8:16 ` muller at ics dot u-strasbg dot fr
2010-04-13  9:24 ` muller at ics dot u-strasbg dot fr
2010-04-13 10:43 ` joost at cnoc dot nl
2010-05-08 15:20 ` muller at ics dot u-strasbg dot fr
2010-05-12 12:47 ` muller at ics dot u-strasbg dot fr
2010-05-15 20:47 ` jan dot kratochvil at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).