Allow specifying a zero size for --vm-disasm to have it size the shader automatically
PATCH 1/1 Allow specifying a zero size for --vm-disasm to have it size the shader automatically
Signed-off-by Tom St Denis <[email protected]>
--- doc/umr.1 | 3 ++- src/app/main.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-)
doc/umr.1 +2 -1
@@ -115,7 +115,8 @@ Write 'size' bytes (in hex) to the address specified (in hexadecimal) to VRAM from stdin. .IP "--vm-disasm, -vdis [<vmid>@]<address> <size>" -Disassemble 'size' bytes (in hex) from a given address (in hex). +Disassemble 'size' bytes (in hex) from a given address (in hex). The size can be +specified as zero to have umr try and compute the shader size. .IP "--update, -u" <filename> Specify update file to add, change, or delete registers from the register
src/app/main.c +8 -1
@@ -489,6 +489,12 @@ int main(int argc, char **argv) vmid |=UMR_USER_HUB ;sscanf (argv[i+2 ],"%" SCNx32, &size); +if (!size) { +struct umr_shaders_pgm shader; + shader.vmid = vmid; + shader.addr = address; + size =umr_compute_shader_size (asic, &shader); + }umr_vm_disasm (asic, vmid, address,0 , size); i +=2 ;
@@ -573,7 +579,8 @@ int main(int argc, char **argv)"\n\t--vm-write, -vw [<vmid>@]<address> <size>" "\n\t\tWrite 'size' bytes (in hex) to a given address (in hex) from stdin.\n" "\n\t--vm-disasm, -vdis [<vmid>@]<address> <size>" -"\n\t\tDisassemble 'size' bytes (in hex) from a given address (in hex).\n" +"\n\t\tDisassemble 'size' bytes (in hex) from a given address (in hex). The size can" +"\n\t\tbe specified as zero to have umr try and compute the shader size.\n" "\n\t--option -O <string>[,<string>,...]\n\t\tEnable various flags: bits, bitsfull, empty_log, follow, no_follow_ib, named, many," "\n\t\tuse_pci, use_colour, read_smc, quiet, no_kernel, verbose, halt_waves, disasm_early_term.\n" "\n\n", UMR_BUILD_VER, UMR_BUILD_REV);
Signature · 6 lines
2.14.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx