| 916 | bytes. */ |
| 917 | |
| 918 | static uint64_t |
| 919 | read_address (struct dwarf_buf *buf, int addrsize) |
| 920 | { |
| 921 | switch (addrsize) |
| 922 | { |
| 923 | case 1: |
| 924 | return read_byte (buf); |
| 925 | case 2: |
| 926 | return read_uint16 (buf); |
| 927 | case 4: |
| 928 | return read_uint32 (buf); |
| 929 | case 8: |
| 930 | return read_uint64 (buf); |
| 931 | default: |
| 932 | dwarf_buf_error (buf, "unrecognized address size", 0); |
| 933 | return 0; |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | /* Return whether a value is the highest possible address, given the |
| 938 | address size. */ |
no test coverage detected