OLD | NEW |
1 /* Support for printing Modula 2 types for GDB, the GNU debugger. | 1 /* Support for printing Modula 2 types for GDB, the GNU debugger. |
2 Copyright (C) 1986, 1988-1989, 1991-1992, 1995, 2000-2012 Free | 2 Copyright (C) 1986, 1988-1989, 1991-1992, 1995, 2000-2012 Free |
3 Software Foundation, Inc. | 3 Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 fprintf_filtered (stream, "("); | 600 fprintf_filtered (stream, "("); |
601 len = TYPE_NFIELDS (type); | 601 len = TYPE_NFIELDS (type); |
602 lastval = 0; | 602 lastval = 0; |
603 for (i = 0; i < len; i++) | 603 for (i = 0; i < len; i++) |
604 { | 604 { |
605 QUIT; | 605 QUIT; |
606 if (i > 0) | 606 if (i > 0) |
607 fprintf_filtered (stream, ", "); | 607 fprintf_filtered (stream, ", "); |
608 wrap_here (" "); | 608 wrap_here (" "); |
609 fputs_filtered (TYPE_FIELD_NAME (type, i), stream); | 609 fputs_filtered (TYPE_FIELD_NAME (type, i), stream); |
610 » if (lastval != TYPE_FIELD_BITPOS (type, i)) | 610 » if (lastval != TYPE_FIELD_ENUMVAL (type, i)) |
611 { | 611 { |
612 » fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i)); | 612 » fprintf_filtered (stream, " = %s", |
613 » lastval = TYPE_FIELD_BITPOS (type, i); | 613 » » » » plongest (TYPE_FIELD_ENUMVAL (type, i))); |
| 614 » lastval = TYPE_FIELD_ENUMVAL (type, i); |
614 } | 615 } |
615 lastval++; | 616 lastval++; |
616 } | 617 } |
617 fprintf_filtered (stream, ")"); | 618 fprintf_filtered (stream, ")"); |
618 } | 619 } |
619 } | 620 } |
OLD | NEW |