[PATCH] arc: Add support for Linux coredump files

Shahab Vahedi shahab.vahedi@gmail.com
Mon Sep 28 13:47:14 GMT 2020


Hi Baris,

On Thu, Sep 17, 2020 at 11:55:42AM +0000, Aktemur, Tankut Baris wrote:
> > On 2020-08-27 7:27 a.m., Shahab Vahedi via Gdb-patches wrote:
> > +bool
> > +arc_target::low_breakpoint_at (CORE_ADDR where)
> > +{
> > +  uint16_t insn;
> > +  uint16_t breakpoint = ntohs (TRAP_S_1_OPCODE);
> > +
> > +  the_target->read_memory (where, (gdb_byte *) &insn, TRAP_S_1_SIZE);
> 
> Because 'the_target' is the same as 'this', you may want to simply call
> 'read_memory' without explicitly stating the receiver object.  This way,
> accessing the global variable could be avoided.

Thank you very much for your input, but since it is not very obvious to
me where/when the "the_target" is initialized, I'd rather keep it this
way. Specially seeing that other targets (ARM and RISCV) doing the same.


Cheers,
Shahab


More information about the Gdb-patches mailing list