Compaq AA-RH99A-TE Remote Starter User Manual


 
You can use this function to look up any type of value; however it is most
useful for retrieving the value of pointers that point to other pointers.
For example:
start_addr = (long) ((long *)utask_fields[7].data + i-NOFILE_IN_U);
if(!read_memory(start_addr , sizeof(long *), (char *)&val1, &error) ||
!read_memory((long)utask_fields[8].data , sizeof(long *), (char *)&val2,
&error)){
fprintf(stderr, "Couldnt read_memory\n");
fprintf(stderr, "%s\n", error);
quit(1);
}
3.2.26 Reading the Response to a kdbx Command
The read_response function reads the response to the last kdbx command
entered. If any errors occurred, NULL is returned and the status argument
is filled in.
This function has the following syntax:
char* read_response(
Status* status);
Argument
Input/Output
Description
status
Output Contains the status of the last kdbx command
For example:
if(!*argv) Usage();
command = argv;
if(size == 0){
sprintf(buf, "print sizeof(*((%s) 0))", type);
dbx(buf, True);
if((resp = read_response(&status)) == NULL){
print_status("Couldnt read sizeof", &status);
quit(1);
}
size = strtoul(resp, &ptr, 0);
if(ptr == resp){
fprintf(stderr, "Couldnt parse sizeof(%s):\n", type);
quit(1);
}
free(resp);
}
Writing Extensions to the kdbx Debugger 3–19