[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tcf-dev] Disassembly Service logic with Symbols
|
- From: Eugene Tarassov <eugenet@xxxxxxxxxx>
- Date: Tue, 1 Sep 2020 17:47:34 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xilinx.com; dmarc=pass action=none header.from=xilinx.com; dkim=pass header.d=xilinx.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=opD3mNhpXV0T96+rp+8VyPa6k7yulam5peIFm4tkjDs=; b=ctDd6L2nkeL9XP5Zko6MMLz3UaBy2ouXsE0w6vNoQV4RYMyXuXjXSH4RCcGo4Dkp6zKB5zZf8O0SGbYKQBqvd0d2SUQIol3iCeaZvfssbDpl5OGJvQiFsVb9dvFUiWwSDLiiOENQot1GKTKcyDqfz8i76DRDQlgFKQNEKulw6Umdk+29SDcmsi+EzwPBwXmbLySKTd/+/fTCj2MDdzsOgqhJmZAFuaHi9lDwV9DEhHaEDvQSgV9Ou4xpIkCEK7koHACt1N8vcdNWDsLtu/G/5+01MBHMcOMfSsvPz5xMdClCcAH9A8V4yRPGHB0Q4oxC6+SIiW0OuQYbWfVALAB6Iw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VIp6uYeKcLKyh5FEE82vf4xVqMS1MxAKwOICxc7vLdPEet+0NVz/FFcRdgUNcWYzyOnfK6VDikN17yCQMpEzw1C/nyeJqpsNF4uuOpln/fSeOn0DEOLxHuE7KTpS4GrTbTFUYxZ4qUFyT1rz+9Tl7BOYTqgnFqZNp4N4GJIyhnWyXJkJfk1BxV7tvBGng3gHcgc2ZtCzdpZ2gqRSkVWbyfYxBqsSSx2+RMPRobUN5bU/cRigaqkckasGQ0FGXbFzjMQ5u6qRE29LuyUIJbIldquRn7BO29drlF4Ge/qAW3h8b74sNCDx2WzhM7KSvINzL1DvXsCopH7Y3k6NDjCFEQ==
- Delivered-to: tcf-dev@xxxxxxxxxxx
- List-archive: <https://www.eclipse.org/mailman/private/tcf-dev>
- List-help: <mailto:tcf-dev-request@eclipse.org?subject=help>
- List-subscribe: <https://www.eclipse.org/mailman/listinfo/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=subscribe>
- List-unsubscribe: <https://www.eclipse.org/mailman/options/tcf-dev>, <mailto:tcf-dev-request@eclipse.org?subject=unsubscribe>
- Thread-index: AQHWf2q08DifUncuSEysAOeCR3Wo7alSkwfwgAFiQbmAABjq0A==
- Thread-topic: Disassembly Service logic with Symbols
Hi David,
Yes.
To be sure we don't start in the middle of an instruction, disassembler starts at a function entry or other suitable symbol, and it can return more than requested.
Regards,
Eugene
-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> On Behalf Of Wilson, David
Sent: Tuesday, September 1, 2020 9:10 AM
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] Disassembly Service logic with Symbols
CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
Hi Eugene - thanks so much for your quick answer.
So - just for further clarification - is it expected, that when symbols are loaded - and we ask for only 1 byte, i.e.:
Command: Disassembly disassemble "ContextID" Addr 1 {}
That we get MORE than one instruction back? We see this behavior when symbols are loaded, and I want to double check If this is expected or a bug. If it is expected - is the reasoning the same?
Best,
David
From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx>
Date: Monday, 31. August 2020 at 21:14
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: Re: [tcf-dev] Disassembly Service logic with Symbols
Hi David,
With variable instruction length (e.g. Intel ISA), disassembler must start at a function symbol and stop at the function end.
To avoid garbage output, it will stop at a function boundary regardless how many instructions are requested.
Clients are supposed to request more if needed and merge the data.
Regards,
Eugene
From: tcf-dev-bounces@xxxxxxxxxxx <tcf-dev-bounces@xxxxxxxxxxx> On Behalf Of Wilson, David
Sent: Monday, August 31, 2020 1:04 AM
To: 'TCF Development' <tcf-dev@xxxxxxxxxxx>
Subject: [tcf-dev] Disassembly Service logic with Symbols
CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
Hi All,
I am wondering if I could get some clarification on how the disassembly command (in the disassembly service, disassembly.c) is meant to deal with cases when symbols are loaded.
The behavior I have noticed:
Command: Disassembly disassemble "ContextID" Addr 1 {}
This will return us at least 1 instruction (even though we've only specified one byte).
Then, we continue to ask for more instructions e.g.:
Command: Disassembly disassemble "ContextID" Addr 500 {}
And this will return us instructions up to the given size.
However - we have noticed, with symbols loaded, that this will reach a "limit" on the size of instructions we can ask for (i.e. we reach a point where we cannot ask for more.
This means even if we ask for: Command: Disassembly disassemble "ContextID" Addr 1000 {}
We still get the same number of instructions returned.
This happens because of the following block:
if (sym_addr_ok && sym_size_ok &&
sym_addr <= buf_addr && sym_addr + sym_size > buf_addr &&
sym_addr + sym_size <= buf_addr + buf_size) {
buf_size = sym_addr + sym_size - buf_addr;
mem_size = (size_t)buf_size;
}
I am wondering if this behavior is expected, and if so - what the purpose of it is.
Kind Regards
David Wilson
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, http://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
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
_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tcf-dev