libmach, acid, db: 64-bit support

This commit is contained in:
Russ Cox 2012-02-19 18:11:39 -05:00
parent 60d96f2e43
commit 443d628838
36 changed files with 2311 additions and 1125 deletions

View file

@ -11,7 +11,7 @@
#include <mach.h>
typedef long WORD;
typedef ulong ADDR;
typedef u64int ADDR;
#define HUGEINT 0x7fffffff /* enormous WORD */

View file

@ -166,7 +166,7 @@ item(int a)
{ /* name [ . local ] | number | . | ^ | <register | 'x | | */
char *base;
char savc;
ulong u;
u64int u;
Symbol s;
char gsym[MAXSYM], lsym[MAXSYM];
@ -388,7 +388,7 @@ dbround(long a, long b)
ulong
dbrget(Map *map, char *name)
{
ulong u;
u64int u;
USED(map);
if(rget(correg, name, &u) < 0)

View file

@ -22,7 +22,7 @@ static void printfp(Map*, int);
* callback on stack trace
*/
static int
ptrace(Map *map, Regs *regs, ulong pc, ulong nextpc, Symbol *sym, int depth)
ptrace(Map *map, Regs *regs, u64int pc, u64int nextpc, Symbol *sym, int depth)
{
char buf[512];
@ -48,7 +48,7 @@ ptrace(Map *map, Regs *regs, ulong pc, ulong nextpc, Symbol *sym, int depth)
static ulong *adrregvals;
static int
adrrw(Regs *regs, char *name, ulong *val, int isr)
adrrw(Regs *regs, char *name, u64int *val, int isr)
{
int i;
@ -215,6 +215,7 @@ printdollar(int modif)
default:
error("bad `$' command");
}
USED(r);
}
@ -359,7 +360,7 @@ void
printpc(void)
{
char buf[512];
ulong u;
u64int u;
if(rget(correg, mach->pc, &u) < 0)
error("%r");

View file

@ -13,7 +13,7 @@ printregs(int c)
{
Regdesc *rp;
int i;
ulong u;
ADDR u;
if(correg == nil){
dprint("registers not mapped\n");

View file

@ -208,7 +208,7 @@ void
runstep(ulong loc, int keepnote)
{
int nfoll;
ulong foll[3];
ADDR foll[3];
BKPT bkpt[3];
int i;