Files | |
file | taskdump.c |
Defines | |
#define | BUFFER_SIZE 0x1000 |
#define | LINE_BYTES 16 |
Functions | |
static off64_t | align_foff_up (off64_t foff, uintptr_t vaddr, size_t page_size) |
Align file offset up to be congruent with vaddr modulo page size. | |
static int | areas_dump (void) |
static void | autoload_syms (void) |
Attempt to find the right executable file and load the symbol table. | |
static int | connect_task (task_id_t task_id) |
int | elf_core_save (const char *file_name, as_area_info_t *ainfo, unsigned int n, int phoneid) |
Save ELF core file. | |
static char * | fmt_sym_address (uintptr_t addr) |
Format address in symbolic form. | |
static char * | get_app_task_name (void) |
int | main (int argc, char *argv[]) |
Main entry point. | |
static int | parse_args (int argc, char *argv[]) |
static void | print_syntax (void) |
static int | td_read_uintptr (void *arg, uintptr_t addr, uintptr_t *value) |
static int | thread_dump (uintptr_t thash) |
static int | threads_dump (void) |
static int | write_all (int fd, void *data, size_t len) |
Write until the buffer is written in its entirety. | |
static int | write_mem_area (int fd, as_area_info_t *area, int phoneid) |
Write memory area from application to core file. | |
Variables | |
static char * | app_name |
static symtab_t * | app_symtab |
static uint8_t | buffer [BUFFER_SIZE] |
static char * | core_file_name |
static int | phoneid |
static task_id_t | task_id |
static bool | write_core_file |
int elf_core_save | ( | const char * | file_name, | |
as_area_info_t * | ainfo, | |||
unsigned int | n, | |||
int | phoneid | |||
) |
Save ELF core file.
file_name | Name of file to save to. | |
ainfo | Array of n memory area info structures. | |
n | Number of memory areas. | |
phoneid | Debugging phone. |
Definition at line 81 of file elf_core.c.
static char * fmt_sym_address | ( | uintptr_t | addr | ) | [static] |
Format address in symbolic form.
Formats address as <symbol_name>+<offset> (<address>), if possible, otherwise as <address>.
addr | Address to format. |
Definition at line 459 of file taskdump.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Main entry point.
Definition at line 75 of file taskdump.c.
static int write_all | ( | int | fd, | |
void * | data, | |||
size_t | len | |||
) | [static] |
Write until the buffer is written in its entirety.
This function fails if it cannot write exactly len bytes to the file.
fd | The file to write to. | |
buf | Data, len bytes long. | |
len | Number of bytes to write. |
Definition at line 265 of file elf_core.c.
static int write_mem_area | ( | int | fd, | |
as_area_info_t * | area, | |||
int | phoneid | |||
) | [static] |
Write memory area from application to core file.
fd | File to write to. | |
area | Memory area info structure. | |
phoneid | Debugging phone. |
Definition at line 223 of file elf_core.c.