Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)

Example 12 Core File Debugging Session for a Stripped Binary When the Symbol Table
is Available from Another Program
This example is similar to Example 11 (page 52). This example illustrates the debugging
of a stripped binary when the symbol table is available from another program that uses
the same symbols.
The programs, example.c and example2.c , have the same symbol table.
Sample Program 1
$ cat example.c
#include <stdio.h>
#include <stdlib.h>
struct st_two {
char *a;
int b;
float c;
char *d;
};
struct st_one {
int one;
char *two;
struct st_two *three;
int *four;
char *five;
};
extern int function_a(struct st_one *, int);
extern int function_b(int, struct st_one *);
extern int function_abort(struct st_one *, int);
main()
{
char *temp1="The meaning";
char *temp2="of life";
char *temp3="is 42";
char *temp4="NOT!";
struct st_one one;
struct st_two two;
one.one=17;
one.two=temp4;
one.three=&two;
one.four=&one.one;
one.five=temp1;
two.a=temp2;
two.b=42;
two.c=19.21;
two.d=temp3;
54