Skip to content

GDB doesn't know about PC/PCL relations #71

@shahab-vahedi

Description

@shahab-vahedi

When GDB loads ELF files into target it sets PC register to "start point" set in this point. For this it sends "P" packet to target and doesn't reread registers after set - register PC is assumed to be set, as long as gdbserver returned success status for P-packet. That means that PCL register is still displayed with it's previous value which is rather unfortunate and might confused a user. It will be nice to avoid that problem, but that is not critical.

On first look there are two ways to fix this:

  1. Update GDB to set PCL to new value when PC is being changed.
  2. Force GDB to refetch PC/PCL after PC is being changed. The latter might be more challenging, since I'm not sure it is possible to set register invalidation in a single place. Another problem would be that gdbserver should be aware of this dependency. For example OpenOCD for "P" packets might not update PC yet, but update it in the cache, so rereading PCL via JTAG will not fix the issue.

kolesov

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions