Changeset 0b9ac3c in mainline for uspace/app/taskdump/symtab.c
- Timestamp:
- 2010-02-23T19:03:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c62d2e1
- Parents:
- 1ccafee (diff), 5e50394 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskdump/symtab.c
r1ccafee r0b9ac3c 49 49 static int section_hdr_load(int fd, const elf_header_t *ehdr, int idx, 50 50 elf_section_header_t *shdr); 51 static int chunk_load(int fd, off _t start, off_t size, void **ptr);51 static int chunk_load(int fd, off64_t start, size_t size, void **ptr); 52 52 static int read_all(int fd, void *buf, size_t len); 53 53 … … 65 65 elf_header_t elf_hdr; 66 66 elf_section_header_t sec_hdr; 67 off_t shstrt_start, shstrt_size; 67 off64_t shstrt_start; 68 size_t shstrt_size; 68 69 char *shstrt, *sec_name; 69 70 void *data; … … 206 207 size_t i; 207 208 char *sname; 209 unsigned stype; 208 210 209 211 for (i = 0; i < st->sym_size / sizeof(elf_symbol_t); ++i) { 210 212 if (st->sym[i].st_name == 0) 213 continue; 214 215 stype = ELF_ST_TYPE(st->sym[i].st_info); 216 if (stype != STT_OBJECT && stype != STT_FUNC) 211 217 continue; 212 218 … … 240 246 uintptr_t saddr, best_addr; 241 247 char *sname, *best_name; 248 unsigned stype; 242 249 243 250 best_name = NULL; … … 248 255 continue; 249 256 257 stype = ELF_ST_TYPE(st->sym[i].st_info); 258 if (stype != STT_OBJECT && stype != STT_FUNC && 259 stype != STT_NOTYPE) { 260 continue; 261 } 262 250 263 saddr = st->sym[i].st_value; 251 264 sname = st->strtab + st->sym[i].st_name; 265 266 /* An ugly hack to filter out some special ARM symbols. */ 267 if (sname[0] == '$') 268 continue; 252 269 253 270 if (best_name == NULL || (saddr <= addr && saddr > best_addr)) { … … 291 308 rc = lseek(fd, elf_hdr->e_shoff + idx * sizeof(elf_section_header_t), 292 309 SEEK_SET); 293 if (rc == (off _t) -1)310 if (rc == (off64_t) -1) 294 311 return EIO; 295 312 … … 312 329 * @return EOK on success or EIO on failure. 313 330 */ 314 static int chunk_load(int fd, off _t start, off_t size, void **ptr)331 static int chunk_load(int fd, off64_t start, size_t size, void **ptr) 315 332 { 316 333 int rc; 317 334 318 335 rc = lseek(fd, start, SEEK_SET); 319 if (rc == (off _t) -1) {336 if (rc == (off64_t) -1) { 320 337 printf("failed seeking chunk\n"); 321 338 *ptr = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.