Bug 511631 - address_to_line does not find all CodeAreas
Summary: address_to_line does not find all CodeAreas
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.5   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 07:36 EST by Anders Conradi CLA
Modified: 2017-05-19 05:30 EDT (History)
0 users

See Also:


Attachments
Simple binary that demonstrates the problem (2.16 KB, application/octet-stream)
2017-02-03 07:36 EST, Anders Conradi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Conradi CLA 2017-02-03 07:36:58 EST
Created attachment 266610 [details]
Simple binary that demonstrates the problem

I add a binary to the memory map manually and then I try to use address_to_line(ctx, 0, 0xffffffffffffffff, cb, data) to find all the CodeAreas in the context. I expect to get several of them. If I limit the address range to the address of the _start-function (address_to_line(ctx, 0x40010c, 0x40010d, cb, data) I do get one CodeArea at 40010c-400110 and line minimal.c:1-2.

If I do address_to_line(ctx, 0x40010c, 0x400123, cb, data) I get multiple code areas with the same address 400120-400123 and line minimal.c:4-5.

I'm not sure how to set this up as a test case that is easy to run without Simics providing surrounding infrastructure.
Comment 1 Eugene Tarassov CLA 2017-02-05 20:49:35 EST
The problem was caused by integer overflow.
Fixed.
Thanks!