I've been trying to learn how to use the acid debugger for a few days
now, but there are a few things I'm having trouble understanding. One
of which is the syntax for dealing with strings.
I have the following program:
#include <u.h> #include <libc.h>
void main(void) {
int x = 10;
int *ip = &x;
int ia[] = { 1, 2, 3 };
char ca[] = "Hello";
char *cp = "World";
exits(0);
}
In acid, I get the following values:
*main:x\d = 10
**main:ip\d = 10
*main:ia\d = 1
*main:ca\s = *s<integer>*
*(main:ca\s) = Hello
*(main:cp\s) = $
The first three values are expected, but when it gets to strings, I
fail to understand what's happening. What is the purpose of the
parenthenses? Why does 'cp' not give me the correct value and just
gives me garbage instead?
Any help would be much appreciated.