arm: gdb-stub is broken by FEAT_HAFDBS

Changbin Du via posted 1 patch 1 year, 4 months ago
Failed in applying to current master (apply log)
arm: gdb-stub is broken by FEAT_HAFDBS
Posted by Changbin Du via 1 year, 4 months ago
Hello, Richard,
We just noticed the gdb-stub is broken and probably caused by commit 4a3585568
("target/arm: Plumb debug into S1Translate").

(gdb) target remote :1234
Remote debugging using :1234
0x000000000e1716d0 in ?? ()
=> 0x000000000e1716d0:  Cannot access memory at address 0xe1716d0

This issue can be workaround by below change.

--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -2879,7 +2879,7 @@ hwaddr arm_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr,
     S1Translate ptw = {
         .in_mmu_idx = arm_mmu_idx(env),
         .in_secure = arm_is_secure(env),
-        .in_debug = true,
+        .in_debug = false,
     };

Could you take a look at this? Thank you!

-- 
Cheers,
Changbin Du
Re: arm: gdb-stub is broken by FEAT_HAFDBS
Posted by Peter Maydell 1 year, 4 months ago
On Wed, 23 Nov 2022 at 11:38, Changbin Du <changbin.du@huawei.com> wrote:
>
> Hello, Richard,
> We just noticed the gdb-stub is broken and probably caused by commit 4a3585568
> ("target/arm: Plumb debug into S1Translate").
>
> (gdb) target remote :1234
> Remote debugging using :1234
> 0x000000000e1716d0 in ?? ()
> => 0x000000000e1716d0:  Cannot access memory at address 0xe1716d0

Hi -- is this fixed by commit 26ba00cf58e9f21b08f (just landed
upstream last night) ?

thanks
-- PMM
Re: arm: gdb-stub is broken by FEAT_HAFDBS
Posted by liyang (CJ) via 1 year, 4 months ago

On 2022/11/23 19:59, Peter Maydell wrote:
> On Wed, 23 Nov 2022 at 11:38, Changbin Du <changbin.du@huawei.com> wrote:
>>
>> Hello, Richard,
>> We just noticed the gdb-stub is broken and probably caused by commit 4a3585568
>> ("target/arm: Plumb debug into S1Translate").
>>
>> (gdb) target remote :1234
>> Remote debugging using :1234
>> 0x000000000e1716d0 in ?? ()
>> => 0x000000000e1716d0:  Cannot access memory at address 0xe1716d0
> 
> Hi -- is this fixed by commit 26ba00cf58e9f21b08f (just landed
> upstream last night) ?
> 
I pulled the mainline  which contains your commit 26ba00cf58e9f21b08f.
The problem is fixed.

Thank you very much.
> thanks
> -- PMM