| 371 | |
| 372 | @exceptions_handler(Exception) |
| 373 | def print_function_starts(binary): |
| 374 | format_str = "{:<13} {:<30}" |
| 375 | format_hex = "{:<13} 0x{:<28x}" |
| 376 | format_dec = "{:<13} {:<30d}" |
| 377 | |
| 378 | print("== Function Starts ==") |
| 379 | |
| 380 | fstarts = binary.function_starts |
| 381 | |
| 382 | print(format_hex.format("Offset:", fstarts.data_offset)) |
| 383 | print(format_hex.format("Size:", fstarts.data_size)) |
| 384 | print("Functions: ({:d})".format(len(fstarts.functions))) |
| 385 | for idx, address in enumerate(fstarts.functions): |
| 386 | print(" [{:d}] __TEXT + 0x{:x}".format(idx, address)) |
| 387 | |
| 388 | print("") |
| 389 | |
| 390 | @exceptions_handler(Exception) |
| 391 | def print_data_in_code(binary): |