projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add cpu/8xxx to TAGS_SUBDIRS
[oweals/u-boot.git]
/
common
/
kgdb.c
diff --git
a/common/kgdb.c
b/common/kgdb.c
index 06adb3ea5142542eca0dd52051cd66cd618c6406..adc15dd79eb7311ca2c34dd48be9d38df85c88dc 100644
(file)
--- a/
common/kgdb.c
+++ b/
common/kgdb.c
@@
-92,7
+92,7
@@
#include <kgdb.h>
#include <command.h>
#include <kgdb.h>
#include <command.h>
-#if
(CONFIG_COMMANDS & CF
G_CMD_KGDB)
+#if
defined(CONFI
G_CMD_KGDB)
#undef KGDB_DEBUG
#undef KGDB_DEBUG
@@
-107,7
+107,7
@@
static char remcomRegBuffer[BUFMAX];
static int initialized = 0;
static int kgdb_active = 0, first_entry = 1;
static struct pt_regs entry_regs;
static int initialized = 0;
static int kgdb_active = 0, first_entry = 1;
static struct pt_regs entry_regs;
-static
u_int
error_jmp_buf[BUFMAX/2];
+static
long
error_jmp_buf[BUFMAX/2];
static int longjmp_on_fault = 0;
#ifdef KGDB_DEBUG
static int kdebug = 1;
static int longjmp_on_fault = 0;
#ifdef KGDB_DEBUG
static int kdebug = 1;
@@
-144,7
+144,7
@@
mem2hex(char *mem, char *buf, int count)
}
*buf = 0;
longjmp_on_fault = 0;
}
*buf = 0;
longjmp_on_fault = 0;
- return buf;
+ return
(unsigned char *)
buf;
}
/* convert the hex array pointed to by buf into binary to be placed in mem
}
/* convert the hex array pointed to by buf into binary to be placed in mem
@@
-310,7
+310,7
@@
handle_exception (struct pt_regs *regs)
/* probably should check which exception occured as well */
if (longjmp_on_fault) {
longjmp_on_fault = 0;
/* probably should check which exception occured as well */
if (longjmp_on_fault) {
longjmp_on_fault = 0;
- kgdb_longjmp(
(long*)
error_jmp_buf, KGDBERR_MEMFAULT);
+ kgdb_longjmp(error_jmp_buf, KGDBERR_MEMFAULT);
panic("kgdb longjump failed!\n");
}
panic("kgdb longjump failed!\n");
}
@@
-324,7
+324,7
@@
handle_exception (struct pt_regs *regs)
printf("kgdb: handle_exception; trap [0x%x]\n", kgdb_trap(regs));
printf("kgdb: handle_exception; trap [0x%x]\n", kgdb_trap(regs));
- if (kgdb_setjmp(
(long*)
error_jmp_buf) != 0)
+ if (kgdb_setjmp(error_jmp_buf) != 0)
panic("kgdb: error or fault in entry init!\n");
kgdb_enter(regs, &kd);
panic("kgdb: error or fault in entry init!\n");
kgdb_enter(regs, &kd);
@@
-353,7
+353,7
@@
handle_exception (struct pt_regs *regs)
*ptr++ = hexchars[rp->num >> 4];
*ptr++ = hexchars[rp->num & 0xf];
*ptr++ = ':';
*ptr++ = hexchars[rp->num >> 4];
*ptr++ = hexchars[rp->num & 0xf];
*ptr++ = ':';
- ptr = mem2hex((char *)&rp->val, ptr, 4);
+ ptr =
(char *)
mem2hex((char *)&rp->val, ptr, 4);
*ptr++ = ';';
}
*ptr++ = ';';
}
@@
-364,7
+364,7
@@
handle_exception (struct pt_regs *regs)
printf("kgdb: remcomOutBuffer: %s\n", remcomOutBuffer);
#endif
printf("kgdb: remcomOutBuffer: %s\n", remcomOutBuffer);
#endif
- putpacket(remcomOutBuffer);
+ putpacket(
(unsigned char *)&
remcomOutBuffer);
while (1) {
volatile int errnum;
while (1) {
volatile int errnum;
@@
-379,7
+379,7
@@
handle_exception (struct pt_regs *regs)
printf("kgdb: remcomInBuffer: %s\n", remcomInBuffer);
#endif
printf("kgdb: remcomInBuffer: %s\n", remcomInBuffer);
#endif
- errnum = kgdb_setjmp(
(long*)
error_jmp_buf);
+ errnum = kgdb_setjmp(error_jmp_buf);
if (errnum == 0) switch (remcomInBuffer[0]) {
if (errnum == 0) switch (remcomInBuffer[0]) {
@@
-508,7
+508,7
@@
handle_exception (struct pt_regs *regs)
#endif
/* reply to the request */
#endif
/* reply to the request */
- putpacket(remcomOutBuffer);
+ putpacket(
(unsigned char *)&
remcomOutBuffer);
} /* while(1) */
}
} /* while(1) */
}
@@
-532,7
+532,7
@@
void
kgdb_error(int errnum)
{
longjmp_on_fault = 0;
kgdb_error(int errnum)
{
longjmp_on_fault = 0;
- kgdb_longjmp(
(long*)
error_jmp_buf, errnum);
+ kgdb_longjmp(error_jmp_buf, errnum);
panic("kgdb_error: longjmp failed!\n");
}
panic("kgdb_error: longjmp failed!\n");
}
@@
-548,7
+548,7
@@
kgdb_output_string (const char* s, unsigned int count)
buffer[0] = 'O';
mem2hex ((char *)s, &buffer[1], count);
buffer[0] = 'O';
mem2hex ((char *)s, &buffer[1], count);
- putpacket(buffer);
+ putpacket(
(unsigned char *)&
buffer);
return 1;
}
return 1;
}
@@
-574,7
+574,7
@@
do_kgdb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
U_BOOT_CMD(
}
U_BOOT_CMD(
- kgdb, C
FG_MAXARGS, 1,
do_kgdb,
+ kgdb, C
ONFIG_SYS_MAXARGS, 1,
do_kgdb,
"kgdb - enter gdb remote debug mode\n",
"[arg0 arg1 .. argN]\n"
" - executes a breakpoint so that kgdb mode is\n"
"kgdb - enter gdb remote debug mode\n",
"[arg0 arg1 .. argN]\n"
" - executes a breakpoint so that kgdb mode is\n"
@@
-591,4
+591,4
@@
U_BOOT_CMD(
int kgdb_not_configured = 1;
int kgdb_not_configured = 1;
-#endif
/* CFG_CMD_KGDB */
+#endif