[comp.sys.hp] xdb debugger question?

albert@netcom.UUCP (Albert Hui) (08/30/90)

I am debugging a C program that has static data that is getting
corrupted before the first statement in my main.  Somebody
suggested that I single step in assembley mode before the
first statement in main.  But xdb always jumps to the
first statement in main even with the debugger in the assembley
mode.

This is what I am doing:
	Start xdb
	td #go into assemble mode
	s #single step

It always go to the first statement in main.


Am I not doing something first?

Thanks.

bigelow@hpfcso.HP.COM (Jim Bigelow) (08/30/90)

> I am debugging a C program that has static data that is getting
> corrupted before the first statement in my main.  Somebody
> suggested that I single step in assembley mode before the
> first statement in main.  But xdb always jumps to the
> first statement in main even with the debugger in the assembley
> mode.

> This is what I am doing:
> 	Start xdb
> 	td #go into assemble mode
>	s #single step

Here's the problem, s/S steps statement by statement, use j/J to step at the
instruction level.

Best Regards,

Jim Bigelow
Colorado Language Lab
HP

#include <standard disclaimer>

steve-t@hpfcso.HP.COM (Steve Taylor) (08/30/90)

} > This is what I am doing:
} > 	Start xdb
} > 	td #go into assemble mode
} >	s #single step
} Here's the problem, s/S steps statement by statement, use j/J to step at the
} instruction level.

Jim is thinking in cdb mode.  s/S in disassembly mode does single step at the
instruction level in xdb.  However, when xdb starts the child process (user
program), it sets a breakpoint at _main and free-runs to it.  I don't know of
a way to change this (which is not proof one doesn't exist.)

Why not use adb? 					Regards, Steve Taylor

NOT A STATEMENT, OFFICIAL OR OTHERWISE, OF THE HEWLETT-PACKARD COMPANY.