[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tcf-dev] Disassembly Service logic with Symbols
|
- From: "Wilson, David" <david.wilson@xxxxxxxxx>
- Date: Tue, 1 Sep 2020 16:09:57 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=hAlKqqx2BW8mt6Kn13mnf7cWG2pB5mBVxbiB/yKSr9A=; b=CFVSucitE/H1c2I7IipZPWRnO7L5eRe/8fQFtknBUfLaGmi81b2e8Hz3KyqIvJ4fdrEOSwyqZ6USqCxMwvySa51O//PyAvvUgwZZ0ET9hp5ndv+8ygXlDAgpEAxBZCWv0YOyFQ6w8tpwV6EM59Pk5Mtd6veZlCtq0fWI1i0UJJUEUH+rCIHkaoHwOqXlwJPxqUUFtEKXBPUZbS2P9JAUGhZ+BxKu/Aja2Y+ZTnqOFRGjfq60/J1v6rG8bWAtuJdE0KLUG2ZMUgnJFUWInuyrmpHFgOQn0lLRwh2vTUIJHGumyVmv/2fUTTVoLEIQQst6su27WGcGrF9kak3Sx8v8/w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PP8H5ZzltA3nWWMJLjf/Hkf3NI9svSWAAoB+zJ3tU7xPPs7OyWWA2aN4HOC/SWB2l6s0P25u0+USz4vTv9G8q52d5PVgNL9dz6cxDCWKMN6Mf1FD4YqXP9iT7F19Rvy6JyM3gqJeG7757k8trLnyBBiFwzBndf0BGds93xwkeGJyg7PQYcwPQeyZcxA/wvXBZwtlwI9zvP/fhi99GUHBLi/sG65RcpwfnrZsQFM91S7Pva/ALzgaIJFXDzNzeee/CxOaXWpauVVDLPK9grEqRnNxqeDLpr4E96GgxSwBUj5Bqn392BAnr+AMDVUznqYyQtQTBYC01DJGhoS3OC3wQQ==
- Delivered-to: tcf-dev@xxxxxxxxxxx
- Ironport-sdr: UD/txiFvAUNK0FbTjwWHtcCu+ZTu05mSSwF9OwIa9s4YfBEA04ddD3e09fn/ndNFofziwvuycA AJXC+eXwy35A==
- Ironport-sdr: cWnq0ykeFShKlO26Pfv80aWdk6ZwlbV6BisstFUNAMVd0Qpjr00CsEbVFdj2WSQ/b4J2LHKz70 tkErDZJzkbuQ==
- 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: AQHWf2q08DifUncuSEysAOeCR3Wo7alSkwfwgAFiQbk=
- Thread-topic: Disassembly Service logic with Symbols
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