[PATCH] arc: Add support for Linux coredump files

Aktemur, Tankut Baris tankut.baris.aktemur@intel.com
Thu Sep 17 11:55:42 GMT 2020


> 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.

> +  return (insn == breakpoint);
> +}

Regards
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list