lncg / edb-debugger

Automatically exported from code.google.com/p/edb-debugger
GNU General Public License v2.0
0 stars 0 forks source link

Stack and heap addresses' lower half is 0000 #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install edb-debugger on debian 7 i386
2. Run file or attach to process with edb-debugger
3.

The stack and addresses shown in edb all have "0000" as their lower half. 
Screenshot attached.

Tried this with svn revisions 337,336,250,100 and they all had this issue.

Original issue reported on code.google.com by somename...@gmail.com on 14 Mar 2014 at 3:47

Attachments:

GoogleCodeExporter commented 9 years ago
interesting, I haven't encountered that before. I'll install edb on debian 7 
and see if I can reproduce it.

Thanks for the report.

Original comment by evan.teran on 14 Mar 2014 at 6:18

GoogleCodeExporter commented 9 years ago
I was able to reproduce the issue, and will try to fix it ASAP.

Original comment by evan.teran on 14 Mar 2014 at 7:38

GoogleCodeExporter commented 9 years ago
Should be fixed now in the latest SVN. Please confirm if you get the chance.

Original comment by evan.teran on 14 Mar 2014 at 7:58

GoogleCodeExporter commented 9 years ago
I'm still having the same issue in revision 338.

Original comment by somename...@gmail.com on 14 Mar 2014 at 8:30

GoogleCodeExporter commented 9 years ago
Hmm, I did test on i386 Debian 7... Can you try a fresh checkout and build? The 
solution was in the qhexview widget not the edb source itself. So I wonder if 
it updated the externals correctly.

Original comment by evan.teran on 14 Mar 2014 at 8:33

GoogleCodeExporter commented 9 years ago
Also, if that still doesn't work. Can you confirm that the contents of 
src/qhexview/qhexview.cpp have functions which look like this:

----->8-----
        template <>
        struct address_format<4> {

                template <class T>
                static QString format_address(T address, const show_separator_tag&) {
                        static char buffer[10];
                        const quint16 hi = (address >> 16) & 0xffff;
                        const quint16 lo = (address & 0xffff);

                        qsnprintf(buffer, sizeof(buffer), "%04x:%04x" , hi, lo);
                        return QString::fromLocal8Bit(buffer);
                }

                template <class T>
                static QString format_address(T address) {
                        static char buffer[9];
                        const quint16 hi = (address >> 16) & 0xffff;
                        const quint16 lo = (address & 0xffff);

                        qsnprintf(buffer, sizeof(buffer), "%04x%04x" , hi, lo);
                        return QString::fromLocal8Bit(buffer);
                }
        };
----->8-----

Before I was passing the address parts directly to the qsnprintf, but now I am 
storing them in variables of a specific width. Making it easier to get the 
format string correct in light of 32/64 bit issues.

Original comment by evan.teran on 14 Mar 2014 at 8:35

GoogleCodeExporter commented 9 years ago
It works after new build. Thanks a lot for fixing it and for developing this 
very useful debugger :)

Original comment by somename...@gmail.com on 14 Mar 2014 at 8:39