Skip to content

Commit

Permalink
Merge pull request #232 from chaoticgd/procdesprint
Browse files Browse the repository at this point in the history
Improve procedure descriptor printing, update changelog
  • Loading branch information
chaoticgd authored Aug 13, 2024
2 parents af88fed + b35a30c commit 1e8bbf5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## v2.1

- Stack variable offsets will now be relative to the value of the stack pointer register for the current function.
- Variable symbols are no longer incorrectly deduplicated as if they were types.
- The static keyword is no longer missing from the output for static global variables.
- Structs defined inside global variable definitions are now printed with the correct C++ syntax.
- Fixed an issue where in some cases null addresses would be handled incorrectly.
- Glibc-based Linux builds are now provided in addition to musl-based builds.
- Glibc-based Linux builds are now provided in addition to the musl-based builds.
- stdump: In C++ output, stack variable offsets will now be relative to the value of the stack pointer register for the current function by default.
- stdump: Added `includes` subcommand.
- stdump: Added `--procedures` option.
- stdump: Added `--sort-by-address` option.
Expand Down
28 changes: 14 additions & 14 deletions src/ccc/mdebug_section.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,20 +302,20 @@ static void print_symbol(FILE* out, const Symbol& symbol)

static void print_procedure_descriptor(FILE* out, const ProcedureDescriptor& procedure_descriptor)
{
fprintf(out, " Address %x\n", procedure_descriptor.address);
fprintf(out, " Symbol Index %d\n", procedure_descriptor.symbol_index);
fprintf(out, " Line Number Entry Index %d\n", procedure_descriptor.line_number_entry_index);
fprintf(out, " Saved Register Mask %d\n", procedure_descriptor.saved_register_mask);
fprintf(out, " Saved Register Offset %d\n", procedure_descriptor.saved_register_offset);
fprintf(out, " Optimization Entry Index %d\n", procedure_descriptor.optimization_entry_index);
fprintf(out, " Saved Float Register Mask %d\n", procedure_descriptor.saved_float_register_mask);
fprintf(out, " Saved Float Register Offset %d\n", procedure_descriptor.saved_float_register_offset);
fprintf(out, " Frame Size %d\n", procedure_descriptor.frame_size);
fprintf(out, " Frame Pointer Register %hd\n", procedure_descriptor.frame_pointer_register);
fprintf(out, " Return PC Register %hd\n", procedure_descriptor.return_pc_register);
fprintf(out, " Line Number Low %d\n", procedure_descriptor.line_number_low);
fprintf(out, " Line Number High %d\n", procedure_descriptor.line_number_high);
fprintf(out, " Line Number Offset %d\n", procedure_descriptor.line_number_offset);
fprintf(out, " Address 0x%08x\n", procedure_descriptor.address);
fprintf(out, " Symbol Index %d\n", procedure_descriptor.symbol_index);
fprintf(out, " Line Number Entry Index %d\n", procedure_descriptor.line_number_entry_index);
fprintf(out, " Saved Register Mask 0x%08x\n", procedure_descriptor.saved_register_mask);
fprintf(out, " Saved Register Offset %d\n", procedure_descriptor.saved_register_offset);
fprintf(out, " Optimization Entry Index %d\n", procedure_descriptor.optimization_entry_index);
fprintf(out, " Saved Float Register Mask 0x%08x\n", procedure_descriptor.saved_float_register_mask);
fprintf(out, " Saved Float Register Offset %d\n", procedure_descriptor.saved_float_register_offset);
fprintf(out, " Frame Size %d\n", procedure_descriptor.frame_size);
fprintf(out, " Frame Pointer Register %hd\n", procedure_descriptor.frame_pointer_register);
fprintf(out, " Return PC Register %hd\n", procedure_descriptor.return_pc_register);
fprintf(out, " Line Number Low %d\n", procedure_descriptor.line_number_low);
fprintf(out, " Line Number High %d\n", procedure_descriptor.line_number_high);
fprintf(out, " Line Number Offset %d\n", procedure_descriptor.line_number_offset);
}

static Result<s32> get_corruption_fixing_fudge_offset(s32 section_offset, const SymbolicHeader& hdrr)
Expand Down

0 comments on commit 1e8bbf5

Please sign in to comment.