Skip to main content

[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: Mon, 31 Aug 2020 19:13:14 +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=wkvTg5VxlYybX3ZIB6nDvYbpBaB7NUzPbE0nRqPmxGc=; b=dvYkXPG2GIbneaXF3BCYuKYifHdBTlAsQuVoObNTQ/ROs0GvjQ4gWmeqNK+EFNCQqsuuMrWX1cSc/OKJGdffUYK7Na/gHTZcpU7KFkAUx8N6w8cRl21GE5cK2h8X0Soxc4Uzp4YWYMa9ABBG1cyL8SE7uwYyUq1lK66XZ2RBDVH+rNwKg+dJ9Qc6UBSGpke1y8FK9VNN04nA5Rn52QI7gr1g+8fxb9tqZqTQOeE309SCpKAYZmSogeIByRxzZD2SqVwiCnL4gK7zTS2AdPeMgmWNKkz53cf0uyhEkVuRG6qHiP2UgrVABZ6ZXj1Bg2L9HiJ+bCahBoEUs+3jrOEUlA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kTQ5cemMqrXCFVm0wSKpTk8KlGhOioxMUWoMII5yw5S0F8Oscu3nzW3pKNIeQdL+SIVVmK2M3QL592NBRFAurRIg6IzZzCN3fBQf+DQM3grXzdFSpRZLPSzamPlQopGrOdXRMvveNPTLGT4pGo9xOdxvdU3bIK57dsRtGE+Cxtr84v239fJzq9JzU8ES+nsZvBG+C29H0rai5HOyD+Oi23pDe6mQNg8oVbVLbn3i9mhfuchhZciySQfWiwSUzAjGARYUN+VMDzGPU+mwm7/V234S75wy8NkC+JwMiG0oo1zLPLb+S6RpSq8w7xPjAqz05e9fObCNgilU8tQjB1TKFA==
  • 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: AQHWf2q08DifUncuSEysAOeCR3Wo7alSkwfw
  • Thread-topic: 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, 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


Back to the top