Git Product home page Git Product logo

dexter's People

Contributors

emaste avatar gregbedwell avatar jmorse avatar jwilk avatar ochyams avatar sltozer avatar tomweaver18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dexter's Issues

unable to read memory with clang-cl_vs2015 and vs2015 debugger.

If i run dexter with the following command:

py -3 .\dexter.py test .\tests\nostdlib\struct_inline_calls\ --builder clang-cl_vs2015 --debugger vs2015 --cflags="/Zi /Od" --ldflags="/Zi" --verbose

given the following test case, I'm unable to read the memory of a struct passed by value to doSomeMath:

`
struct foo {
static const size_t size = 7;
int a;
int b;
short c;
short data[size];
};

volatile foo * gpAwk;

inline void initABC(foo & bar, const int arg) {
bar.a = 6 + arg;
bar.b = 10 + arg; // DexLabel('initABC_str')
bar.c = 256 + arg; // DexLabel('initABC_end')
}

inline void initData(foo & bar, const int arg) {
for (size_t ix = 0; ix != bar.size; ++ix) { // DexLabel('initData_str')
bar.data[ix] = ix + arg; // DexLabel('initData_end')
}
}

inline int doSomeMath(foo bar, const int arg) {
int someMath = bar.a + bar.b + bar.c;
someMath += arg; // DexLabel('doSomeMath_str')
return someMath; // DexLabel('doSomeMath_end')
}

inline int makeSomePointers(foo & bar) {
if (bar.a) { // DexLabel('makeSomePointers_str')
gpAwk = &bar;
return 0;
}
return bar.a + bar.b + bar.c; // DexLabel('makeSomePointers_end')
}

int main(int argc, const char * argv[]) {
argc -= 1; // DexLabel('main_str')
foo bar;
initABC(bar, argc);
initData(bar, argc);
makeSomePointers(bar);
int math = doSomeMath(bar, argc);
return math +
bar.a +
bar.b +
bar.c +
bar.data[1] +
bar.data[6]; // DexLabel('main_end')
}

// DexExpectWatchType('bar', 'foo', from_line='main_str', to_line='main_end')

// DexExpectWatchValue('bar.a', 6, from_line='initABC_str', to_line='initABC_end')
// DexExpectWatchValue('bar.b', 0, 10, from_line='initABC_str', to_line='initABC_end')
// DexExpectWatchValue('bar.c', 0, from_line='initABC_str', to_line='initABC_end')

// DexExpectWatchValue('bar.a', 6, from_line='initData_str', to_line='initData_end')
// DexExpectWatchValue('bar.b', 10, from_line='initData_str', to_line='initData_end')
// DexExpectWatchValue('bar.c', 256, from_line='initData_str', to_line='initData_end')
// DexExpectWatchValue('bar.data[1]', 0, 1, from_line='initData_str', to_line='initData_end')
// DexExpectWatchValue('bar.data[6]', 0, 6, from_line='initData_str', to_line='initData_end')

// DexExpectWatchValue('bar.a', 6, from_line='doSomeMath_str', to_line='doSomeMath_end')
// DexExpectWatchValue('bar.b', 10, from_line='doSomeMath_str', to_line='doSomeMath_end')
// DexExpectWatchValue('bar.c', 256, from_line='doSomeMath_str', to_line='doSomeMath_end')
// DexExpectWatchValue('bar.data[1]', 0, 1, from_line='doSomeMath_str', to_line='doSomeMath_end')
// DexExpectWatchValue('bar.data[6]', 0, 6, from_line='doSomeMath_str', to_line='doSomeMath_end')

// DexExpectWatchValue('bar.a', 6, from_line='makeSomePointers_str', to_line='makeSomePointers_end')
// DexExpectWatchValue('bar.b', 10, from_line='makeSomePointers_str', to_line='makeSomePointers_end')
// DexExpectWatchValue('bar.c', 256, from_line='makeSomePointers_str', to_line='makeSomePointers_end')
// DexExpectWatchValue('bar.data[1]', 1, from_line='makeSomePointers_str', to_line='makeSomePointers_end')
// DexExpectWatchValue('bar.data[6]', 6, from_line='makeSomePointers_str', to_line='makeSomePointers_end')

// DexExpectWatchValue('bar.a', 0, 6, from_line='main_str', to_line='main_end')
// DexExpectWatchValue('bar.b', 0, 10, from_line='main_str', to_line='main_end')
// DexExpectWatchValue('bar.c', 0, 256, from_line='main_str', to_line='main_end')
// DexExpectWatchValue('bar.data[1]', 0, 1, from_line='main_str', to_line='main_end')
// DexExpectWatchValue('bar.data[6]', 0, 6, from_line='main_str', to_line='main_end')
`

for all the attempted reads between doSomeMath_str and doSomeMath_end i get the following message:
` test.cpp:25-26 [bar.a] ExpectValue [4/7]
result could not be retrieved:
step 36 () [-4]
step 37 ()

test.cpp:25-26 [bar.b] ExpectValue [4/7]
result could not be retrieved:
step 36 () [-4]
step 37 ()

test.cpp:25-26 [bar.c] ExpectValue [4/7]
result could not be retrieved:
step 36 () [-4]
step 37 ()

test.cpp:25-26 [bar.data[1]] ExpectValue [8/14]
result could not be retrieved:
step 36 () [-4]
step 37 () [-4]

test.cpp:25-26 [bar.data[6]] ExpectValue [8/14]
result could not be retrieved:
step 36 () [-4]
step 37 () [-4]
`

however, If I spin up visual studio and run the debugger I have no problems viewing the struct members with the doSomeMath function.

Dexter can't identify when it's stepped into the right source files

I have a problem with this code [0], which seems to be designed to make the debugger "continue" if we're not yet in a correct source file. On windows under dbgeng, step_info.current_location.path is

 c:\users\jmorse\source\debuginfo-tests\dexter-tests\hello.c

And self.context.options.source_files is

['C:\\Users\\gbmorsej\\source\\o\\debuginfo-tests\\dexter-tests\\hello.c']

Which are two very different strings. The symptom is that dbgeng doesn't implement "go"; but even if it did, this would still be broken.

Ultimately I don't think we should be trying to resolve the paths that the debugger coughs up into paths on the actual filesystem -- or if we do, we should make that the debugger drivers problem, not generic code.

[0]

if (step_info.current_frame

[RFC] Builders don't use local clang

In the RFC which we're totally uploading to llvm sometime soon, and isn't on this github project yet, all the builder scripts that dexter uses just call "clang". They don't actually build things using the clang binaries in the build tree that debuginfo-tests is associated with.

Contributing to DExTer

Contributing to DExTer section of the README isn't complete.

We require llvm-lit and the other tools frequently used with it: not and FileCheck. I don't know if there's a packaged version of these hosted anywhere like there is for llvm-lit`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.