* Remove -l flag in rarc2
- Replaced by rarc2 -a * Fix build
This commit is contained in:
parent
8f9dbbd0d1
commit
01b56da424
|
@ -711,11 +711,11 @@ static int parsechar(char c) {
|
|||
static void showhelp() {
|
||||
fprintf (stderr,
|
||||
"Usage: r2rc [-alh] [files] > file.S\n"
|
||||
" -A Show current architecture\n"
|
||||
" -l List all supported architectures\n"
|
||||
" -s use at&t syntax instead of intel\n"
|
||||
" -m add 'call main prefix\n"
|
||||
" -h Display this help\n"
|
||||
" -h display this help\n"
|
||||
" -A show default architecture\n"
|
||||
" -a list all supported architectures\n"
|
||||
" -ax86 use x86-32\n"
|
||||
" -ax64 use x86-64\n"
|
||||
" -aarm use ARM\n");
|
||||
|
@ -725,6 +725,7 @@ static void parseflag(const char *arg) {
|
|||
int i;
|
||||
switch (*arg) {
|
||||
case 'a':
|
||||
if (arg[1]) {
|
||||
emit = NULL;
|
||||
for (i=0; emits[i]; i++)
|
||||
if (!strcmp (emits[i]->arch, arg+1)) {
|
||||
|
@ -736,6 +737,11 @@ static void parseflag(const char *arg) {
|
|||
eprintf ("Invalid architecture: '%s'\n", arg+1);
|
||||
exit (1);
|
||||
}
|
||||
} else {
|
||||
for (i=0; emits[i]; i++)
|
||||
printf ("%s\n", emits[i]->arch);
|
||||
exit (0);
|
||||
}
|
||||
break;
|
||||
case 'm':
|
||||
showmain = 1;
|
||||
|
@ -746,10 +752,6 @@ static void parseflag(const char *arg) {
|
|||
case 'A':
|
||||
printf ("%s\n", emit->arch);
|
||||
exit (0);
|
||||
case 'l':
|
||||
for (i=0; emits[i]; i++)
|
||||
printf ("%s\n", emits[i]->arch);
|
||||
exit (0);
|
||||
case 'h':
|
||||
showhelp ();
|
||||
exit (0);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
printf@alias(0x804400);
|
||||
main@global(,32) {
|
||||
printf("Hello World\n");
|
||||
}
|
||||
|
|
|
@ -756,7 +756,7 @@ static void *gdbwrap_writememory(gdbwrap_t *desc, la32 linaddr,
|
|||
static void *gdbwrap_writememory2(gdbwrap_t *desc, la32 linaddr,
|
||||
void *value, unsigned bytes)
|
||||
{
|
||||
char *rec *packet;
|
||||
char *rec, *packet;
|
||||
u_char *val = value;
|
||||
u_short i;
|
||||
u_int len;
|
||||
|
@ -764,7 +764,7 @@ static void *gdbwrap_writememory2(gdbwrap_t *desc, la32 linaddr,
|
|||
packet = malloc (2*bytes+MSG_BUF);
|
||||
if (packet == NULL) {
|
||||
eprintf ("Cannot allocate %d bytes\n", 2*bytes+MSG_BUF);
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(packet, MSG_BUF, "%s%x%s%x%s", GDBWRAP_MEMWRITE2,
|
||||
|
|
Loading…
Reference in New Issue