Re: [PATCH 8/8] Don't throw exception in dis_asm_memory_error

Yao Qi
2017-01-12T21:09:16Z

On Thu, Jan 12, 2017 at 4:40 PM, Pedro Alves <palves@redhat.com> wrote:
> On 01/10/2017 12:26 PM, Yao Qi wrote:
>> --- a/gdb/testsuite/gdb.base/all-architectures.exp.in
>> +++ b/gdb/testsuite/gdb.base/all-architectures.exp.in
>> @@ -152,6 +152,9 @@ proc print_floats {} {
>>
>> proc do_arch_tests {} {
>> print_floats
>> +
>> + gdb_test_internal "disassemble 0x0,+4" \
>> + "Cannot access memory at address 0x0"
>> }
>
> This will fail if you're testing against a non-MMU target,
> where you can read address 0. Check is_address_zero_readable?
>

There is no live inferior created in the test, so GDB can't access any
memory. Probably I need a line of comment,

# GDB can't access any memory because there is no live inferior.

--
Yao (齐尧)