TartanLlama / minidbg

A mini x86 linux debugger for teaching purposes
MIT License
592 stars 104 forks source link

Some mistakes about the data type. #16

Open Luyoung0001 opened 4 months ago

Luyoung0001 commented 4 months ago

std::intptr_t is a better choice than uint64_t when applies to an address. Once I use uint64_t data type to describe an address, step_in, step_out, stepi, step_over... funcs will not work normally.

So, this problem has to be fixed.

also, std::sto-functions may be used properly, I chose stoull when i need to trans string 0xADDR to std::intptr_t instead stoi, or something wrong may occur. like: m_load_address = std::stoull(addr, 0, 16); that could be better.

I also noticed that this project seems dead, so I will not pr, just reminding other people who are doing this small project.