[Pdbg] [PATCH] pdbg: implement 'log' command
joel at jms.id.au
Mon May 21 12:00:02 AEST 2018
On 21 May 2018 at 11:24, Alistair Popple <alistair at popple.id.au> wrote:
> On Friday, 18 May 2018 4:57:28 PM AEST Joel Stanley wrote:
>> This command fetches the skiboot in-memory log from host RAM and
>> display it on stdout.
>> Signed-off-by: Joel Stanley <joel at jms.id.au>
>> Based on top of Balbir's logging patches.
> I assume you mean Amitay's? ;)
>> +ssize_t adu_read_from_buffer(struct pdbg_target *target, void *to, size_t count,
>> + loff_t *ppos, uint64_t from, size_t available)
> Bit of a nit pick but why do you use host sized variable types here (eg.
> loff_t)? Technically these are the same regardless of host (ie. BMC)
> architecture as they are defined by the debug target architecture (ie. PPC64).6
This is a cut/paste of the kernel code. I guess size_t could only be
big enough for a 32-bit pointer.
Happy to rework with different types if you think it makes sense.
> Really we should define some debug target specific types for this (eg.
> target_real_addr_t) but so far we haven't bothered to.
Ok. Should we do that, or have annotations like we do for endianness?
More information about the Pdbg