2 examples for macro debugging – HP gnu source-level debugger 5992-4701 User Manual
Page 155

The macro debugging features are supported for +objdebug and +noobjdebug
compiler options.
14.9.2 Examples for Macro Debugging
The following example illustrates the use of the macro debugging:
Sample Program:
$ cat scope.c
1
2 #include
3
4 #define USED1 100
5 #define USED2 200
6 #define UNUSED1 0
7 #define UNUSED2 0
8 #define DUMMY1
9 #define DUMMY2
10
11 int
12 main ()
13 {
14
15 int val = USED1;
16
17 #undef UNUSED1
18 #undef USED2
19 #undef USED1
20 #define USED1 101
21 #define USED2 201
22
23 val = USED1 + USED2;
24
25 #undef USED1
26 #undef UNUSED2
27 #undef USED2
28 #define USED1 102
29
30 val = USED1;
31
32 return 0;
33 }
Sample Debugging Session
•
The following debugging session illustrates macro debugging when the program
is com- piled with +macro_debug=all option:
$ cc -g +macro_debug=all -o sc scope.c
$ gdb sc
HP gdb for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
...
14.9 Debugging Macros
155
- NRM42 (61 pages)
- ProLiant ML370 (49 pages)
- ProLiant ML370 (50 pages)
- ProLiant ML110 G5 (32 pages)
- PC Comm Station Pro 304251-008 (North America) (5 pages)
- 100B-TX (32 pages)
- 3C905B-TX (110 pages)
- EK-STWCT-UG. E01 (45 pages)
- 3800ux (13 pages)
- 5991-6764 (8 pages)
- LTO 4 FC (46 pages)
- StorageWorks Network Attached Storage X3000 (16 pages)
- Ultrium Drive (30 pages)
- ProLiant DL360 (49 pages)
- CD Leycom CFL-512 (5 pages)
- RDX160 (12 pages)
- 345524-B21 (54 pages)
- DT-20 (20 pages)
- SureStore 7115w (136 pages)
- HD1600 (2 pages)
- ProLiant DL160 (38 pages)
- Vectra XW (16 pages)
- D2D4004i (20 pages)
- F1588A (4 pages)
- 94500 (1 page)
- Computer Parts (21 pages)
- MSA50 (8 pages)
- 7750 (32 pages)
- Media Gateways G350 (76 pages)
- P400 Serial (9 pages)
- MSL4048 (4 pages)
- 3C590-TPO (40 pages)
- mv2040 (2 pages)
- AHA-8940 (82 pages)
- ProLiant DL385 (47 pages)
- ProLiant DL385 (174 pages)
- 5300A (19 pages)
- AMD Geode E2047551001R (111 pages)
- 1100d (102 pages)
- Reliable Transaction Router (100 pages)
- xp1024 (2 pages)
- 180 Degree Turn (24 pages)
- procurve J8165A (32 pages)
- 04H8095 (28 pages)
- 744 (154 pages)