[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 06/34] Hexagon (disas) disassembler
From: |
Richard Henderson |
Subject: |
Re: [RFC PATCH v3 06/34] Hexagon (disas) disassembler |
Date: |
Wed, 26 Aug 2020 06:52:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/18/20 8:50 AM, Taylor Simpson wrote:
> + len = disassemble_hexagon(words, i, buf, PACKET_BUFFER_LEN);
> + slen = strlen(buf);
> + if (buf[slen - 1] == '\n') {
> + buf[slen - 1] = '\0';
> + }
> + (*info->fprintf_func)(info->stream, "%s", buf);
Normally our disassemblers print the instruction address; sometimes the raw
bytes (or word) of the instruction.
Looking forward to patch 14 where disassemble_hexagon is defined, I see none of
that. Indeed, if disassembly fails, we get...
> + if (decode_this(nwords, words, &pkt)) {
> + snprint_a_pkt(buf, bufsize, &pkt);
> + return pkt.encod_pkt_size_in_bytes;
> + } else {
> + snprintf(buf, bufsize, "<invalid>");
> + return 0;
> + }
... no indication at all what happened or where, just "<invalid>". That's not
going to make it easy to find problems.
r~
- RE: [RFC PATCH v3 04/34] Hexagon (target/hexagon) scalar core definition, (continued)
- [RFC PATCH v3 08/34] Hexagon (target/hexagon) GDB Stub, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 01/34] Hexagon Update MAINTAINERS file, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 15/34] Hexagon (target/hexagon) instruction printing, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 05/34] Hexagon (target/hexagon) register names, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 06/34] Hexagon (disas) disassembler, Taylor Simpson, 2020/08/18
- Re: [RFC PATCH v3 06/34] Hexagon (disas) disassembler,
Richard Henderson <=
- [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 02/34] Hexagon (target/hexagon) README, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 03/34] Hexagon (include/elf.h) ELF machine definition, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 13/34] Hexagon (target/hexagon) register map, Taylor Simpson, 2020/08/18