##// END OF EJS Templates
ElfFile classes WIP.
jeandet -
r37:b04e90691097 default
parent child
Show More
@@ -1,6 +1,11
1 #include <QObject>
2 #include <QWidget>
1 #include "qhexspinbox.h"
3 #include "qhexspinbox.h"
2 #include "memsizewdgt.h"
4 #include "memsizewdgt.h"
3 #include "qhexedit/qhexedit.h"
5 #include "qhexedit/qhexedit.h"
4 #include "SocExplorerPlot.h"
6 #include "SocExplorerPlot.h"
5 #include "tcp_terminal_client.h"
7 #include "tcp_terminal_client.h"
6 #include "elf/elfparser.h"
8 #include "elf/elfparser.h"
9 #include "elf/abstractexecfile.h"
10 #include "elf/elffile.h"
11 #include "elf/elffilewidget.h"
@@ -1,38 +1,37
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #include "abstractexecfile.h"
22 #include "abstractexecfile.h"
23
23
24 abstractExecFile::abstractExecFile(QObject *parent) :
24 abstractExecFile::abstractExecFile()
25 QObject(parent)
26 {
25 {
27 }
26 }
28
27
29 abstractExecFile::abstractExecFile(const QString &File, QObject *parent)
28 abstractExecFile::abstractExecFile(const QString &File)
30 {
29 {
31
30
32 }
31 }
33
32
34
33
35 codeFragment::codeFragment()
34 codeFragment::codeFragment()
36 {
35 {
37
36
38 }
37 }
@@ -1,54 +1,50
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #ifndef ABSTRACTEXECFILE_H
22 #ifndef ABSTRACTEXECFILE_H
23 #define ABSTRACTEXECFILE_H
23 #define ABSTRACTEXECFILE_H
24
24
25 #include <QObject>
25 #include <QObject>
26
26
27 class codeFragment
27 class codeFragment
28 {
28 {
29 public:
29 public:
30 codeFragment();
30 codeFragment();
31 char* data;
31 char* data;
32 quint32 size;
32 quint32 size;
33 quint32 address;
33 quint32 address;
34 };
34 };
35
35
36 class abstractExecFile : public QObject
36 class abstractExecFile
37 {
37 {
38 Q_OBJECT
39 public:
38 public:
40 abstractExecFile(QObject *parent = 0);
39 abstractExecFile();
41 abstractExecFile(const QString& File,QObject *parent = 0);
40 abstractExecFile(const QString& File);
42 virtual bool openFile(const QString& File)=0;
41 virtual bool openFile(const QString& File)=0;
43 virtual bool isopened()=0;
42 virtual bool isopened()=0;
44 virtual int closeFile()=0;
43 virtual int closeFile()=0;
45 virtual QList<codeFragment> getFragments()=0;
44 virtual QList<codeFragment> getFragments()=0;
46 signals:
47
48 public slots:
49
45
50 protected:
46 protected:
51 QString p_fileName;
47 QString p_fileName;
52 };
48 };
53
49
54 #endif // ABSTRACTEXECFILE_H
50 #endif // ABSTRACTEXECFILE_H
@@ -1,113 +1,114
1 SOCEXPLORER_ROOT = \"$${PWD}/../..\"
1 SOCEXPLORER_ROOT = \"$${PWD}/../..\"
2 include($${PWD}/../../build_cfg/socexplorer.pri)
2 include($${PWD}/../../build_cfg/socexplorer.pri)
3 include($${PWD}/lppserial/lppserial.pri)
3 include($${PWD}/lppserial/lppserial.pri)
4
4
5 TEMPLATE = lib
5 TEMPLATE = lib
6 TARGET = socexplorercommon$${DEBUG_EXT}
6 TARGET = socexplorercommon$${DEBUG_EXT}
7
7
8 win32:CONFIG += dll
8 win32:CONFIG += dll
9 win32:CONFIG -= static
9 win32:CONFIG -= static
10
10
11 win32:INCLUDEPATH += $${PWD}/elf/libelfWin32/include
11 win32:INCLUDEPATH += $${PWD}/elf/libelfWin32/include
12 win32:INCLUDEPATH += $${PWD}/elf/libelfWin32/include/libelf
12 win32:INCLUDEPATH += $${PWD}/elf/libelfWin32/include/libelf
13 win32:DEFINES+=_ELF_WINDOWS_
13 win32:DEFINES+=_ELF_WINDOWS_
14 DEFINES+=RS232_debug
14 DEFINES+=RS232_debug
15
15
16 win32:LIBS += $${PWD}/elf/libelfWin32/bin/libelf.a
16 win32:LIBS += $${PWD}/elf/libelfWin32/bin/libelf.a
17 unix:LIBS += -lelf
17 unix:LIBS += -lelf
18
18
19 QMAKE_LFLAGS_RELEASE += --enable-auto-import
19 QMAKE_LFLAGS_RELEASE += --enable-auto-import
20 QMAKE_LFLAGS_DEBUG += --enable-auto-import
20 QMAKE_LFLAGS_DEBUG += --enable-auto-import
21
21
22 target.path = $$[QT_INSTALL_LIBS]
22 target.path = $$[QT_INSTALL_LIBS]
23 isEmpty(target.path) {
23 isEmpty(target.path) {
24 error(can\'t get QT_INSTALL_LIBS)
24 error(can\'t get QT_INSTALL_LIBS)
25 }
25 }
26
26
27 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common
27 header.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common
28 header.files = \
28 header.files = \
29 memsizewdgt.h \
29 memsizewdgt.h \
30 qhexspinbox.h \
30 qhexspinbox.h \
31 qsvgicon.h \
31 qsvgicon.h \
32 qhexedit/qhexedit_p.h \
32 qhexedit/qhexedit_p.h \
33 qhexedit/qhexedit.h \
33 qhexedit/qhexedit.h \
34 qhexedit/xbytearray.h \
34 qhexedit/xbytearray.h \
35 QCustomPlot/qcustomplot.h \
35 QCustomPlot/qcustomplot.h \
36 SocExplorerPlot.h \
36 SocExplorerPlot.h \
37 tcp_terminal_client.h \
37 tcp_terminal_client.h \
38 elf/elfinfowdgt.h \
38 elf/elfinfowdgt.h \
39 elf/elfparser.h \
39 elf/elfparser.h \
40 elf/elffile.h \
40 elf/elffile.h \
41 elf/elffilewidget.h \
41 qipdialogbox.h \
42 qipdialogbox.h \
42 lppserial/src/RS232.h
43 lppserial/src/RS232.h
43
44
44 win32{
45 win32{
45 elfheader.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common/libelf
46 elfheader.path = $$[QT_INSTALL_HEADERS]/SocExplorer/common/libelf
46 elfheader.files += \
47 elfheader.files += \
47 elf/libelfWin32/include/libelf/byteswap.h \
48 elf/libelfWin32/include/libelf/byteswap.h \
48 elf/libelfWin32/include/libelf/errors.h \
49 elf/libelfWin32/include/libelf/errors.h \
49 elf/libelfWin32/include/libelf/gelf.h \
50 elf/libelfWin32/include/libelf/gelf.h \
50 elf/libelfWin32/include/libelf/nlist.h \
51 elf/libelfWin32/include/libelf/nlist.h \
51 elf/libelfWin32/include/libelf/sys_elf.h \
52 elf/libelfWin32/include/libelf/sys_elf.h \
52 elf/libelfWin32/include/libelf/verneed.h \
53 elf/libelfWin32/include/libelf/verneed.h \
53 elf/libelfWin32/include/libelf/elf_repl.h \
54 elf/libelfWin32/include/libelf/elf_repl.h \
54 elf/libelfWin32/include/libelf/ext_types.h \
55 elf/libelfWin32/include/libelf/ext_types.h \
55 elf/libelfWin32/include/libelf/libelf.h \
56 elf/libelfWin32/include/libelf/libelf.h \
56 elf/libelfWin32/include/libelf/private.h \
57 elf/libelfWin32/include/libelf/private.h \
57 elf/libelfWin32/include/libelf/verdef.h
58 elf/libelfWin32/include/libelf/verdef.h
58 INSTALLS += elfheader
59 INSTALLS += elfheader
59 }
60 }
60
61
61
62
62 isEmpty(header.path) {
63 isEmpty(header.path) {
63 error(can\'t get QT_INSTALL_HEADERS)
64 error(can\'t get QT_INSTALL_HEADERS)
64 }
65 }
65
66
66 INSTALLS += target header
67 INSTALLS += target header
67
68
68 INCLUDEPATH += QCustomPlot qhexedit
69 INCLUDEPATH += QCustomPlot qhexedit
69
70
70 HEADERS += \
71 HEADERS += \
71 memsizewdgt.h \
72 memsizewdgt.h \
72 qhexspinbox.h \
73 qhexspinbox.h \
73 qsvgicon.h \
74 qsvgicon.h \
74 qhexedit/qhexedit_p.h \
75 qhexedit/qhexedit_p.h \
75 qhexedit/qhexedit.h \
76 qhexedit/qhexedit.h \
76 qhexedit/xbytearray.h \
77 qhexedit/xbytearray.h \
77 qhexedit/commands.h \
78 qhexedit/commands.h \
78 QCustomPlot/qcustomplot.h \
79 QCustomPlot/qcustomplot.h \
79 tcp_terminal_client.h \
80 tcp_terminal_client.h \
80 elf/elfinfowdgt.h \
81 elf/elfinfowdgt.h \
81 elf/elfparser.h \
82 elf/elfparser.h \
82 abstractexecfile.h \
83 abstractexecfile.h \
83 elf/elffile.h \
84 elf/elffile.h \
84 qipdialogbox.h \
85 qipdialogbox.h \
85 PySocExplorer.h \
86 PySocExplorer.h \
86 SocExplorerPlot.h \
87 SocExplorerPlot.h \
87 elf/elffilewidget.h
88 elf/elffilewidget.h
88
89
89
90
90 SOURCES += \
91 SOURCES += \
91 memsizewdgt.cpp \
92 memsizewdgt.cpp \
92 qhexspinbox.cpp \
93 qhexspinbox.cpp \
93 qsvgicon.cpp \
94 qsvgicon.cpp \
94 qhexedit/qhexedit_p.cpp \
95 qhexedit/qhexedit_p.cpp \
95 qhexedit/qhexedit.cpp \
96 qhexedit/qhexedit.cpp \
96 qhexedit/xbytearray.cpp \
97 qhexedit/xbytearray.cpp \
97 qhexedit/commands.cpp \
98 qhexedit/commands.cpp \
98 QCustomPlot/qcustomplot.cpp \
99 QCustomPlot/qcustomplot.cpp \
99 tcp_terminal_client.cpp \
100 tcp_terminal_client.cpp \
100 elf/elfinfowdgt.cpp \
101 elf/elfinfowdgt.cpp \
101 elf/elfparser.cpp \
102 elf/elfparser.cpp \
102 abstractexecfile.cpp \
103 abstractexecfile.cpp \
103 elf/elffile.cpp \
104 elf/elffile.cpp \
104 qipdialogbox.cpp \
105 qipdialogbox.cpp \
105 SocExplorerPlot.cpp \
106 SocExplorerPlot.cpp \
106 elf/elffilewidget.cpp
107 elf/elffilewidget.cpp
107
108
108 FORMS += \
109 FORMS += \
109 elf/elffilewidget.ui
110 elf/elffilewidget.ui
110
111
111
112
112
113
113
114
@@ -1,101 +1,101
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author :
19 /*-- Author :
20 Alexis Jeandet
20 Alexis Jeandet
21 -- Mail :
21 -- Mail :
22 alexis.jeandet@member.fsf.org
22 alexis.jeandet@member.fsf.org
23 ----------------------------------------------------------------------------*/
23 ----------------------------------------------------------------------------*/
24 #include "elffile.h"
24 #include "elffile.h"
25
25
26 ElfFile::ElfFile(QObject *parent) :
26 ElfFile::ElfFile(QObject *parent)
27 abstractExecFile(parent)
27 :QObject(parent),abstractExecFile(),elfparser()
28 {
28 {
29 }
29 }
30
30
31 ElfFile::ElfFile(const QString &File, QObject *parent)
31 ElfFile::ElfFile(const QString &File, QObject *parent)
32 :abstractExecFile(parent),elfparser()
32 :QObject(parent),abstractExecFile(),elfparser()
33 {
33 {
34 this->p_fileName = File;
34 this->p_fileName = File;
35 setFilename(File);
35 setFilename(File);
36 }
36 }
37
37
38 bool ElfFile::openFile(const QString &File)
38 bool ElfFile::openFile(const QString &File)
39 {
39 {
40 this->p_fileName = File;
40 this->p_fileName = File;
41 return setFilename(File);
41 return setFilename(File);
42 }
42 }
43
43
44 bool ElfFile::isopened()
44 bool ElfFile::isopened()
45 {
45 {
46 return elfparser::isopened();
46 return elfparser::isopened();
47 }
47 }
48
48
49 int ElfFile::closeFile()
49 int ElfFile::closeFile()
50 {
50 {
51 return elfparser::closeFile();
51 return elfparser::closeFile();
52 }
52 }
53
53
54
54
55 QList<codeFragment> ElfFile::getFragments(QStringList fragmentList)
55 QList<codeFragment> ElfFile::getFragments(QStringList fragmentList)
56 {
56 {
57 QList<codeFragment> fragments;
57 QList<codeFragment> fragments;
58 if (isopened())
58 if (isopened())
59 {
59 {
60 for(int i =0;i<fragmentList.count();i++)
60 for(int i =0;i<fragmentList.count();i++)
61 {
61 {
62 fragments.append(getFragment(fragmentList.at(i)));
62 fragments.append(getFragment(fragmentList.at(i)));
63 }
63 }
64 }
64 }
65 return fragments;
65 return fragments;
66 }
66 }
67
67
68 QList<codeFragment> ElfFile::getFragments()
68 QList<codeFragment> ElfFile::getFragments()
69 {
69 {
70 return getFragments(QStringList()<<".data"<<".text");
70 return getFragments(QStringList()<<".data"<<".text");
71 }
71 }
72
72
73 codeFragment ElfFile::getFragment(const QString &name)
73 codeFragment ElfFile::getFragment(const QString &name)
74 {
74 {
75 codeFragment fragment;
75 codeFragment fragment;
76 for(int i=0;i<getSectioncount();i++)
76 for(int i=0;i<getSectioncount();i++)
77 {
77 {
78 if(getSectionName(i) == name)
78 if(getSectionName(i) == name)
79 {
79 {
80 fragment.data =NULL;
80 fragment.data =NULL;
81 fragment.size = getSectionDatasz(i);
81 fragment.size = getSectionDatasz(i);
82 fragment.address = getSectionPaddr(i);
82 fragment.address = getSectionPaddr(i);
83 getSectionData(i,&fragment.data);
83 getSectionData(i,&fragment.data);
84 }
84 }
85 }
85 }
86
86
87 }
87 }
88
88
89
89
90
90
91
91
92
92
93
93
94
94
95
95
96
96
97
97
98
98
99
99
100
100
101
101
@@ -1,51 +1,51
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #include <abstractexecfile.h>
22 #include <abstractexecfile.h>
23 #include <elf.h>
23 #include <elf.h>
24 #include "elfparser.h"
24 #include "elfparser.h"
25 #include <QStringList>
25 #include <QStringList>
26
26
27 #ifndef ELFFILE_H
27 #ifndef ELFFILE_H
28 #define ELFFILE_H
28 #define ELFFILE_H
29
29
30 class ElfFile : public abstractExecFile, public elfparser
30 class ElfFile :public QObject, public abstractExecFile, public elfparser
31 {
31 {
32 Q_OBJECT
32 Q_OBJECT
33 public:
33 public:
34 ElfFile(QObject *parent = 0);
34 ElfFile(QObject *parent = 0);
35 ElfFile(const QString& File,QObject *parent = 0);
35 ElfFile(const QString& File,QObject *parent = 0);
36 bool openFile(const QString& File);
36 bool openFile(const QString& File);
37 bool isopened();
37 bool isopened();
38 int closeFile();
38 int closeFile();
39 QList<codeFragment> getFragments();
39 QList<codeFragment> getFragments();
40 QList<codeFragment> getFragments(QStringList fragmentList);
40 QList<codeFragment> getFragments(QStringList fragmentList);
41 // elfparser parser;
41 // elfparser parser;
42
42
43 signals:
43 signals:
44
44
45 public slots:
45 public slots:
46 private:
46 private:
47 codeFragment getFragment(const QString& name);
47 codeFragment getFragment(const QString& name);
48
48
49 };
49 };
50
50
51 #endif // ELFFILE_H
51 #endif // ELFFILE_H
@@ -1,26 +1,44
1 #include "elffilewidget.h"
1 #include "elffilewidget.h"
2 #include "ui_elffilewidget.h"
2 #include "ui_elffilewidget.h"
3
3
4 elfFileWidget::elfFileWidget(QWidget *parent) :
4 elfFileWidget::elfFileWidget(QWidget *parent) :
5 QWidget(parent),
5 QWidget(parent),
6 ui(new Ui::elfFileWidget)
6 ui(new Ui::elfFileWidget)
7 {
7 {
8 ui->setupUi(this);
8 ui->setupUi(this);
9 }
9 }
10
10
11 elfFileWidget::~elfFileWidget()
11 elfFileWidget::~elfFileWidget()
12 {
12 {
13 delete ui;
13 delete ui;
14 }
14 }
15
15
16 void elfFileWidget::updateElfFile(ElfFile *file)
16 void elfFileWidget::updateElfFile(ElfFile *file)
17 {
17 {
18 this->p_elf = file;
18 this->p_elf = file;
19 if(p_elf->isopened() && p_elf->iself())
19 if(p_elf->isopened() && p_elf->iself())
20 {
20 {
21 this->ui->classLabel->setText(p_elf->getClass());
21 this->ui->classLabel->setText(p_elf->getClass());
22 this->ui->VersionLabel->setText(QString::number(p_elf->getVersion()));
22 this->ui->VersionLabel->setText(QString::number(p_elf->getVersion()));
23 this->ui->machineLabel->setText(p_elf->getArchitecture());
23 this->ui->machineLabel->setText(p_elf->getArchitecture());
24 this->ui->endiannesLabel->setText(p_elf->getEndianness());
24 this->ui->endiannesLabel->setText(p_elf->getEndianness());
25 this->ui->abiLabel->setText(p_elf->getABI());
26 this->ui->entryPointLabel->setText("0x"+QString::number(p_elf->getEntryPointAddress(),16,8));
27 this->ui->sectionCountLabel->setText(QString::number(p_elf->getSectioncount()));
25 }
28 }
26 }
29 }
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@@ -1,737 +1,769
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #include "elfparser.h"
22 #include "elfparser.h"
23 #include <sys/types.h>
23 #include <sys/types.h>
24 #include <sys/stat.h>
24 #include <sys/stat.h>
25 #include <fcntl.h>
25 #include <fcntl.h>
26 #include <unistd.h>
26 #include <unistd.h>
27
27
28 QString elfresolveMachine(Elf64_Half e_machine)
28 QString elfresolveMachine(Elf64_Half e_machine)
29 {
29 {
30 QString machineName;
30 QString machineName;
31 //Update from with bash script don't write it by yourself!
31 //Update from with bash script don't write it by yourself!
32 switch(e_machine)
32 switch(e_machine)
33 {
33 {
34 case EM_NONE:
34 case EM_NONE:
35 machineName = " No machine ";
35 machineName = " No machine ";
36 break;
36 break;
37 case EM_M32:
37 case EM_M32:
38 machineName = " AT&T WE 32100 ";
38 machineName = " AT&T WE 32100 ";
39 break;
39 break;
40 case EM_SPARC:
40 case EM_SPARC:
41 machineName = " SUN SPARC ";
41 machineName = " SUN SPARC ";
42 break;
42 break;
43 case EM_386:
43 case EM_386:
44 machineName = " Intel 80386 ";
44 machineName = " Intel 80386 ";
45 break;
45 break;
46 case EM_68K:
46 case EM_68K:
47 machineName = " Motorola m68k family ";
47 machineName = " Motorola m68k family ";
48 break;
48 break;
49 case EM_88K:
49 case EM_88K:
50 machineName = " Motorola m88k family ";
50 machineName = " Motorola m88k family ";
51 break;
51 break;
52 case EM_860:
52 case EM_860:
53 machineName = " Intel 80860 ";
53 machineName = " Intel 80860 ";
54 break;
54 break;
55 case EM_MIPS:
55 case EM_MIPS:
56 machineName = " MIPS R3000 big-endian ";
56 machineName = " MIPS R3000 big-endian ";
57 break;
57 break;
58 case EM_S370:
58 case EM_S370:
59 machineName = " IBM System/370 ";
59 machineName = " IBM System/370 ";
60 break;
60 break;
61 case EM_MIPS_RS3_LE:
61 case EM_MIPS_RS3_LE:
62 machineName = " MIPS R3000 little-endian ";
62 machineName = " MIPS R3000 little-endian ";
63 break;
63 break;
64 case EM_PARISC:
64 case EM_PARISC:
65 machineName = " HPPA ";
65 machineName = " HPPA ";
66 break;
66 break;
67 case EM_VPP500:
67 case EM_VPP500:
68 machineName = " Fujitsu VPP500 ";
68 machineName = " Fujitsu VPP500 ";
69 break;
69 break;
70 case EM_SPARC32PLUS:
70 case EM_SPARC32PLUS:
71 machineName = " Sun's \"v8plus\" ";
71 machineName = " Sun's \"v8plus\" ";
72 break;
72 break;
73 case EM_960:
73 case EM_960:
74 machineName = " Intel 80960 ";
74 machineName = " Intel 80960 ";
75 break;
75 break;
76 case EM_PPC:
76 case EM_PPC:
77 machineName = " PowerPC ";
77 machineName = " PowerPC ";
78 break;
78 break;
79 case EM_PPC64:
79 case EM_PPC64:
80 machineName = " PowerPC 64-bit ";
80 machineName = " PowerPC 64-bit ";
81 break;
81 break;
82 case EM_S390:
82 case EM_S390:
83 machineName = " IBM S390 ";
83 machineName = " IBM S390 ";
84 break;
84 break;
85 case EM_V800:
85 case EM_V800:
86 machineName = " NEC V800 series ";
86 machineName = " NEC V800 series ";
87 break;
87 break;
88 case EM_FR20:
88 case EM_FR20:
89 machineName = " Fujitsu FR20 ";
89 machineName = " Fujitsu FR20 ";
90 break;
90 break;
91 case EM_RH32:
91 case EM_RH32:
92 machineName = " TRW RH-32 ";
92 machineName = " TRW RH-32 ";
93 break;
93 break;
94 case EM_RCE:
94 case EM_RCE:
95 machineName = " Motorola RCE ";
95 machineName = " Motorola RCE ";
96 break;
96 break;
97 case EM_ARM:
97 case EM_ARM:
98 machineName = " ARM ";
98 machineName = " ARM ";
99 break;
99 break;
100 case EM_FAKE_ALPHA:
100 case EM_FAKE_ALPHA:
101 machineName = " Digital Alpha ";
101 machineName = " Digital Alpha ";
102 break;
102 break;
103 case EM_SH:
103 case EM_SH:
104 machineName = " Hitachi SH ";
104 machineName = " Hitachi SH ";
105 break;
105 break;
106 case EM_SPARCV9:
106 case EM_SPARCV9:
107 machineName = " SPARC v9 64-bit ";
107 machineName = " SPARC v9 64-bit ";
108 break;
108 break;
109 case EM_TRICORE:
109 case EM_TRICORE:
110 machineName = " Siemens Tricore ";
110 machineName = " Siemens Tricore ";
111 break;
111 break;
112 case EM_ARC:
112 case EM_ARC:
113 machineName = " Argonaut RISC Core ";
113 machineName = " Argonaut RISC Core ";
114 break;
114 break;
115 case EM_H8_300:
115 case EM_H8_300:
116 machineName = " Hitachi H8/300 ";
116 machineName = " Hitachi H8/300 ";
117 break;
117 break;
118 case EM_H8_300H:
118 case EM_H8_300H:
119 machineName = " Hitachi H8/300H ";
119 machineName = " Hitachi H8/300H ";
120 break;
120 break;
121 case EM_H8S:
121 case EM_H8S:
122 machineName = " Hitachi H8S ";
122 machineName = " Hitachi H8S ";
123 break;
123 break;
124 case EM_H8_500:
124 case EM_H8_500:
125 machineName = " Hitachi H8/500 ";
125 machineName = " Hitachi H8/500 ";
126 break;
126 break;
127 case EM_IA_64:
127 case EM_IA_64:
128 machineName = " Intel Merced ";
128 machineName = " Intel Merced ";
129 break;
129 break;
130 case EM_MIPS_X:
130 case EM_MIPS_X:
131 machineName = " Stanford MIPS-X ";
131 machineName = " Stanford MIPS-X ";
132 break;
132 break;
133 case EM_COLDFIRE:
133 case EM_COLDFIRE:
134 machineName = " Motorola Coldfire ";
134 machineName = " Motorola Coldfire ";
135 break;
135 break;
136 case EM_68HC12:
136 case EM_68HC12:
137 machineName = " Motorola M68HC12 ";
137 machineName = " Motorola M68HC12 ";
138 break;
138 break;
139 case EM_MMA:
139 case EM_MMA:
140 machineName = " Fujitsu MMA Multimedia Accelerator";
140 machineName = " Fujitsu MMA Multimedia Accelerator";
141 break;
141 break;
142 case EM_PCP:
142 case EM_PCP:
143 machineName = " Siemens PCP ";
143 machineName = " Siemens PCP ";
144 break;
144 break;
145 case EM_NCPU:
145 case EM_NCPU:
146 machineName = " Sony nCPU embeeded RISC ";
146 machineName = " Sony nCPU embeeded RISC ";
147 break;
147 break;
148 case EM_NDR1:
148 case EM_NDR1:
149 machineName = " Denso NDR1 microprocessor ";
149 machineName = " Denso NDR1 microprocessor ";
150 break;
150 break;
151 case EM_STARCORE:
151 case EM_STARCORE:
152 machineName = " Motorola Start*Core processor ";
152 machineName = " Motorola Start*Core processor ";
153 break;
153 break;
154 case EM_ME16:
154 case EM_ME16:
155 machineName = " Toyota ME16 processor ";
155 machineName = " Toyota ME16 processor ";
156 break;
156 break;
157 case EM_ST100:
157 case EM_ST100:
158 machineName = " STMicroelectronic ST100 processor ";
158 machineName = " STMicroelectronic ST100 processor ";
159 break;
159 break;
160 case EM_TINYJ:
160 case EM_TINYJ:
161 machineName = " Advanced Logic Corp. Tinyj emb.fam";
161 machineName = " Advanced Logic Corp. Tinyj emb.fam";
162 break;
162 break;
163 case EM_X86_64:
163 case EM_X86_64:
164 machineName = " AMD x86-64 architecture ";
164 machineName = " AMD x86-64 architecture ";
165 break;
165 break;
166 case EM_PDSP:
166 case EM_PDSP:
167 machineName = " Sony DSP Processor ";
167 machineName = " Sony DSP Processor ";
168 break;
168 break;
169 case EM_FX66:
169 case EM_FX66:
170 machineName = " Siemens FX66 microcontroller ";
170 machineName = " Siemens FX66 microcontroller ";
171 break;
171 break;
172 case EM_ST9PLUS:
172 case EM_ST9PLUS:
173 machineName = " STMicroelectronics ST9+ 8/16 mc ";
173 machineName = " STMicroelectronics ST9+ 8/16 mc ";
174 break;
174 break;
175 case EM_ST7:
175 case EM_ST7:
176 machineName = " STmicroelectronics ST7 8 bit mc ";
176 machineName = " STmicroelectronics ST7 8 bit mc ";
177 break;
177 break;
178 case EM_68HC16:
178 case EM_68HC16:
179 machineName = " Motorola MC68HC16 microcontroller ";
179 machineName = " Motorola MC68HC16 microcontroller ";
180 break;
180 break;
181 case EM_68HC11:
181 case EM_68HC11:
182 machineName = " Motorola MC68HC11 microcontroller ";
182 machineName = " Motorola MC68HC11 microcontroller ";
183 break;
183 break;
184 case EM_68HC08:
184 case EM_68HC08:
185 machineName = " Motorola MC68HC08 microcontroller ";
185 machineName = " Motorola MC68HC08 microcontroller ";
186 break;
186 break;
187 case EM_68HC05:
187 case EM_68HC05:
188 machineName = " Motorola MC68HC05 microcontroller ";
188 machineName = " Motorola MC68HC05 microcontroller ";
189 break;
189 break;
190 case EM_SVX:
190 case EM_SVX:
191 machineName = " Silicon Graphics SVx ";
191 machineName = " Silicon Graphics SVx ";
192 break;
192 break;
193 case EM_ST19:
193 case EM_ST19:
194 machineName = " STMicroelectronics ST19 8 bit mc ";
194 machineName = " STMicroelectronics ST19 8 bit mc ";
195 break;
195 break;
196 case EM_VAX:
196 case EM_VAX:
197 machineName = " Digital VAX ";
197 machineName = " Digital VAX ";
198 break;
198 break;
199 case EM_CRIS:
199 case EM_CRIS:
200 machineName = " Axis Communications 32-bit embedded processor ";
200 machineName = " Axis Communications 32-bit embedded processor ";
201 break;
201 break;
202 case EM_JAVELIN:
202 case EM_JAVELIN:
203 machineName = " Infineon Technologies 32-bit embedded processor ";
203 machineName = " Infineon Technologies 32-bit embedded processor ";
204 break;
204 break;
205 case EM_FIREPATH:
205 case EM_FIREPATH:
206 machineName = " Element 14 64-bit DSP Processor ";
206 machineName = " Element 14 64-bit DSP Processor ";
207 break;
207 break;
208 case EM_ZSP:
208 case EM_ZSP:
209 machineName = " LSI Logic 16-bit DSP Processor ";
209 machineName = " LSI Logic 16-bit DSP Processor ";
210 break;
210 break;
211 case EM_MMIX:
211 case EM_MMIX:
212 machineName = " Donald Knuth's educational 64-bit processor ";
212 machineName = " Donald Knuth's educational 64-bit processor ";
213 break;
213 break;
214 case EM_HUANY:
214 case EM_HUANY:
215 machineName = " Harvard University machine-independent object files ";
215 machineName = " Harvard University machine-independent object files ";
216 break;
216 break;
217 case EM_PRISM:
217 case EM_PRISM:
218 machineName = " SiTera Prism ";
218 machineName = " SiTera Prism ";
219 break;
219 break;
220 case EM_AVR:
220 case EM_AVR:
221 machineName = " Atmel AVR 8-bit microcontroller ";
221 machineName = " Atmel AVR 8-bit microcontroller ";
222 break;
222 break;
223 case EM_FR30:
223 case EM_FR30:
224 machineName = " Fujitsu FR30 ";
224 machineName = " Fujitsu FR30 ";
225 break;
225 break;
226 case EM_D10V:
226 case EM_D10V:
227 machineName = " Mitsubishi D10V ";
227 machineName = " Mitsubishi D10V ";
228 break;
228 break;
229 case EM_D30V:
229 case EM_D30V:
230 machineName = " Mitsubishi D30V ";
230 machineName = " Mitsubishi D30V ";
231 break;
231 break;
232 case EM_V850:
232 case EM_V850:
233 machineName = " NEC v850 ";
233 machineName = " NEC v850 ";
234 break;
234 break;
235 case EM_M32R:
235 case EM_M32R:
236 machineName = " Mitsubishi M32R ";
236 machineName = " Mitsubishi M32R ";
237 break;
237 break;
238 case EM_MN10300:
238 case EM_MN10300:
239 machineName = " Matsushita MN10300 ";
239 machineName = " Matsushita MN10300 ";
240 break;
240 break;
241 case EM_MN10200:
241 case EM_MN10200:
242 machineName = " Matsushita MN10200 ";
242 machineName = " Matsushita MN10200 ";
243 break;
243 break;
244 case EM_PJ:
244 case EM_PJ:
245 machineName = " picoJava ";
245 machineName = " picoJava ";
246 break;
246 break;
247 case EM_OPENRISC:
247 case EM_OPENRISC:
248 machineName = " OpenRISC 32-bit embedded processor ";
248 machineName = " OpenRISC 32-bit embedded processor ";
249 break;
249 break;
250 case EM_ARC_A5:
250 case EM_ARC_A5:
251 machineName = " ARC Cores Tangent-A5 ";
251 machineName = " ARC Cores Tangent-A5 ";
252 break;
252 break;
253 case EM_XTENSA:
253 case EM_XTENSA:
254 machineName = " Tensilica Xtensa Architecture ";
254 machineName = " Tensilica Xtensa Architecture ";
255 break;
255 break;
256 case EM_AARCH64:
256 case EM_AARCH64:
257 machineName = " ARM AARCH64 ";
257 machineName = " ARM AARCH64 ";
258 break;
258 break;
259 case EM_TILEPRO:
259 case EM_TILEPRO:
260 machineName = " Tilera TILEPro ";
260 machineName = " Tilera TILEPro ";
261 break;
261 break;
262 case EM_MICROBLAZE:
262 case EM_MICROBLAZE:
263 machineName = " Xilinx MicroBlaze ";
263 machineName = " Xilinx MicroBlaze ";
264 break;
264 break;
265 case EM_TILEGX:
265 case EM_TILEGX:
266 machineName = " Tilera TILE-Gx ";
266 machineName = " Tilera TILE-Gx ";
267 break;
267 break;
268 case EM_NUM:
268 case EM_NUM:
269 machineName = "";
269 machineName = "";
270 break;
270 break;
271 default:
271 default:
272 machineName ="Unknow Machine";
272 machineName ="Unknow Machine";
273 break;
273 break;
274 }
274 }
275 return machineName;
275 return machineName;
276 }
276 }
277
277
278
278
279 elfparser::elfparser()
279 elfparser::elfparser()
280 {
280 {
281 this->opened = false;
281 this->opened = false;
282 this->type_elf = false;
282 this->type_elf = false;
283 this->elfFile = NULL;
283 this->elfFile = NULL;
284 this->e = NULL;
284 this->e = NULL;
285 }
285 }
286
286
287
287
288 int elfparser::setFilename(const QString &name)
288 int elfparser::setFilename(const QString &name)
289 {
289 {
290 this->closeFile();
290 this->closeFile();
291 if(elf_version(EV_CURRENT)==EV_NONE)return 0;
291 if(elf_version(EV_CURRENT)==EV_NONE)return 0;
292 #ifdef _ELF_WINDOWS_
292 #ifdef _ELF_WINDOWS_
293 this->elfFile = open(name.toStdString().c_str(),O_RDONLY|O_BINARY ,0);
293 this->elfFile = open(name.toStdString().c_str(),O_RDONLY|O_BINARY ,0);
294 #else
294 #else
295 this->elfFile = open(name.toStdString().c_str(),O_RDONLY ,0);
295 this->elfFile = open(name.toStdString().c_str(),O_RDONLY ,0);
296 #endif
296 #endif
297 if(this->elfFile==NULL)return 0;
297 if(this->elfFile==NULL)return 0;
298 this->e = elf_begin(this->elfFile,ELF_C_READ,NULL);
298 this->e = elf_begin(this->elfFile,ELF_C_READ,NULL);
299 if(this->e==NULL)return 0;
299 if(this->e==NULL)return 0;
300 this->ek = elf_kind(this->e);
300 this->ek = elf_kind(this->e);
301 gelf_getehdr (this->e, &this->ehdr );
301 gelf_getehdr (this->e, &this->ehdr );
302 elf_getshdrstrndx (this->e, &this->shstrndx);
302 elf_getshdrstrndx (this->e, &this->shstrndx);
303 this->updateSegments();
303 this->updateSegments();
304 this->updateSections();
304 this->updateSections();
305 return 1;
305 return 1;
306 }
306 }
307
307
308
308
309 int elfparser::closeFile()
309 int elfparser::closeFile()
310 {
310 {
311 if(this->elfFile!=NULL)
311 if(this->elfFile!=NULL)
312 {
312 {
313 if(this->e!=NULL)
313 if(this->e!=NULL)
314 {
314 {
315 elf_end(this->e);
315 elf_end(this->e);
316 this->e = NULL;
316 this->e = NULL;
317 }
317 }
318 close(this->elfFile);
318 close(this->elfFile);
319 this->elfFile = NULL;
319 this->elfFile = NULL;
320 }
320 }
321 return 0;
321 return 0;
322 }
322 }
323
323
324 QString elfparser::getClass()
324 QString elfparser::getClass()
325 {
325 {
326 if(this->e!=NULL)
326 if(this->e!=NULL)
327 {
327 {
328 int eclass = gelf_getclass(this->e);
328 int eclass = gelf_getclass(this->e);
329 if(eclass==ELFCLASS32)return "ELF32";
329 if(eclass==ELFCLASS32)return "ELF32";
330 if(eclass==ELFCLASS64)return "ELF64";
330 if(eclass==ELFCLASS64)return "ELF64";
331 }
331 }
332 return "none";
332 return "none";
333 }
333 }
334
334
335
335
336 bool elfparser::isopened()
336 bool elfparser::isopened()
337 {
337 {
338 return this->opened;
338 return this->opened;
339 }
339 }
340
340
341
341
342 bool elfparser::iself()
342 bool elfparser::iself()
343 {
343 {
344 return this->type_elf;
344 return this->type_elf;
345 }
345 }
346
346
347
347
348 QString elfparser::getArchitecture()
348 QString elfparser::getArchitecture()
349 {
349 {
350 if(this->e!=NULL)
350 if(this->e!=NULL)
351 {
351 {
352 return elfresolveMachine(this->ehdr.e_machine);
352 return elfresolveMachine(this->ehdr.e_machine);
353 }
353 }
354 return "";
354 return "";
355 }
355 }
356
356
357
357
358 QString elfparser::getType()
358 QString elfparser::getType()
359 {
359 {
360 QString kind("");
360 QString kind("");
361 if(this->e!=NULL)
361 if(this->e!=NULL)
362 {
362 {
363 switch(this->ek)
363 switch(this->ek)
364 {
364 {
365 case ELF_K_AR:
365 case ELF_K_AR:
366 kind = "Archive";
366 kind = "Archive";
367 break;
367 break;
368 case ELF_K_ELF:
368 case ELF_K_ELF:
369 kind = "Elf";
369 kind = "Elf";
370 break;
370 break;
371 case ELF_K_COFF:
371 case ELF_K_COFF:
372 kind = "COFF";
372 kind = "COFF";
373 break;
373 break;
374 case ELF_K_NUM:
374 case ELF_K_NUM:
375 kind = "NUM";
375 kind = "NUM";
376 break;
376 break;
377 case ELF_K_NONE:
377 case ELF_K_NONE:
378 kind = "Data";
378 kind = "Data";
379 break;
379 break;
380 default:
380 default:
381 kind = "Unknow";
381 kind = "Unknow";
382 break;
382 break;
383 }
383 }
384 }
384 }
385 return kind;
385 return kind;
386 }
386 }
387
387
388 QString elfparser::getEndianness()
388 QString elfparser::getEndianness()
389 {
389 {
390 if(this->e!=NULL)
390 if(this->e!=NULL)
391 {
391 {
392 if(this->ehdr.e_ident[EI_DATA]==ELFDATA2LSB)return "2's complement, little endian";
392 if(this->ehdr.e_ident[EI_DATA]==ELFDATA2LSB)return "2's complement, little endian";
393 if(this->ehdr.e_ident[EI_DATA]==ELFDATA2MSB)return "2's complement, big endian";
393 if(this->ehdr.e_ident[EI_DATA]==ELFDATA2MSB)return "2's complement, big endian";
394 }
394 }
395 return "none";
395 return "none";
396 }
396 }
397
397
398 QString elfparser::getABI()
399 {
400 if(this->e!=NULL)
401 {
402 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_NONE)return "UNIX System V ABI";
403 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_SYSV)return "Alias";
404 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_HPUX)return "HP-UX";
405 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_NETBSD)return "NetBSD";
406 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_GNU)return "Object uses GNU ELF extensions";
407 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_LINUX)return "Compatibility alias";
408 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_SOLARIS)return "Sun Solaris";
409 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_AIX)return "IBM AIX";
410 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_IRIX)return "SGI Irix";
411 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_FREEBSD)return "FreeBSD";
412 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_TRU64)return "Compaq TRU64 UNIX";
413 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_MODESTO)return " Novell Modesto";
414 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_OPENBSD)return "OpenBSD";
415 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_ARM_AEABI)return "ARM EABI";
416 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_ARM)return "ARM";
417 if(this->ehdr.e_ident[EI_OSABI]==ELFOSABI_STANDALONE)return "Standalone (embedded) application";
418 }
419 return "none";
420 }
421
398
422
399 int32_t elfparser::getVersion()
423 int32_t elfparser::getVersion()
400 {
424 {
401 if(this->e!=NULL)
425 if(this->e!=NULL)
402 {
426 {
403 return this->ehdr.e_version;
427 return this->ehdr.e_version;
404 }
428 }
405 }
429 }
406
430
431 int64_t elfparser::getEntryPointAddress()
432 {
433 if(this->e!=NULL)
434 {
435 return this->ehdr.e_entry;
436 }
437 }
438
407
439
408 int elfparser::getSectioncount()
440 int elfparser::getSectioncount()
409 {
441 {
410 return (int)this->SectionCount;
442 return (int)this->SectionCount;
411 }
443 }
412
444
413
445
414 int elfparser::getSegmentcount()
446 int elfparser::getSegmentcount()
415 {
447 {
416 return (int)this->SegmentCount;
448 return (int)this->SegmentCount;
417 }
449 }
418
450
419
451
420 QString elfparser::getSegmentType(int index)
452 QString elfparser::getSegmentType(int index)
421 {
453 {
422 QString type("");
454 QString type("");
423 if(this->e!=NULL)
455 if(this->e!=NULL)
424 {
456 {
425 if(index < this->Segments.count())
457 if(index < this->Segments.count())
426 {
458 {
427 switch(this->Segments.at(index)->p_type)
459 switch(this->Segments.at(index)->p_type)
428 {
460 {
429 case PT_NULL:
461 case PT_NULL:
430 type = "Program header table entry unused";
462 type = "Program header table entry unused";
431 break;
463 break;
432 case PT_LOAD:
464 case PT_LOAD:
433 type = "Loadable program segment";
465 type = "Loadable program segment";
434 break;
466 break;
435 case PT_DYNAMIC :
467 case PT_DYNAMIC :
436 type = "Dynamic linking information";
468 type = "Dynamic linking information";
437 break;
469 break;
438 case PT_INTERP:
470 case PT_INTERP:
439 type ="Program interpreter";
471 type ="Program interpreter";
440 break;
472 break;
441 case PT_NOTE:
473 case PT_NOTE:
442 type = "Auxiliary information";
474 type = "Auxiliary information";
443 break;
475 break;
444 case PT_SHLIB:
476 case PT_SHLIB:
445 type = "Reserved";
477 type = "Reserved";
446 break;
478 break;
447 case PT_PHDR:
479 case PT_PHDR:
448 type = "Entry for header table itself";
480 type = "Entry for header table itself";
449 break;
481 break;
450 case PT_TLS:
482 case PT_TLS:
451 type = "Thread-local storage segment";
483 type = "Thread-local storage segment";
452 break;
484 break;
453 case PT_NUM:
485 case PT_NUM:
454 type = "Number of defined types";
486 type = "Number of defined types";
455 break;
487 break;
456 case PT_LOOS:
488 case PT_LOOS:
457 type = "Start of OS-specific";
489 type = "Start of OS-specific";
458 break;
490 break;
459 case PT_SUNWSTACK:
491 case PT_SUNWSTACK:
460 type = "Stack segment";
492 type = "Stack segment";
461 break;
493 break;
462 case PT_LOPROC:
494 case PT_LOPROC:
463 type = "Start of processor-specific";
495 type = "Start of processor-specific";
464 break;
496 break;
465 case PT_HIPROC:
497 case PT_HIPROC:
466 type = "End of processor-specific";
498 type = "End of processor-specific";
467 break;
499 break;
468 default:
500 default:
469 type = "Unknow Section Type";
501 type = "Unknow Section Type";
470 break;
502 break;
471 }
503 }
472 }
504 }
473 }
505 }
474
506
475 return type;
507 return type;
476 }
508 }
477
509
478
510
479 int64_t elfparser::getSegmentOffset(int index)
511 int64_t elfparser::getSegmentOffset(int index)
480 {
512 {
481 int64_t Offset;
513 int64_t Offset;
482 if(this->e!=NULL)
514 if(this->e!=NULL)
483 {
515 {
484 if(index < this->Segments.count())
516 if(index < this->Segments.count())
485 {
517 {
486 Offset = (int64_t)this->Segments.at(index)->p_offset;
518 Offset = (int64_t)this->Segments.at(index)->p_offset;
487 }
519 }
488 }
520 }
489 return Offset;
521 return Offset;
490 }
522 }
491
523
492
524
493 int64_t elfparser::getSegmentVaddr(int index)
525 int64_t elfparser::getSegmentVaddr(int index)
494 {
526 {
495 int64_t Vaddr = 0;
527 int64_t Vaddr = 0;
496 if(this->e!=NULL)
528 if(this->e!=NULL)
497 {
529 {
498 if(index < this->Segments.count())
530 if(index < this->Segments.count())
499 {
531 {
500 Vaddr = (int64_t)this->Segments.at(index)->p_vaddr;
532 Vaddr = (int64_t)this->Segments.at(index)->p_vaddr;
501 }
533 }
502 }
534 }
503 return Vaddr;
535 return Vaddr;
504 }
536 }
505
537
506
538
507 int64_t elfparser::getSegmentPaddr(int index)
539 int64_t elfparser::getSegmentPaddr(int index)
508 {
540 {
509 int64_t Paddr=0;
541 int64_t Paddr=0;
510 if(this->e!=NULL)
542 if(this->e!=NULL)
511 {
543 {
512 if(index < this->Segments.count())
544 if(index < this->Segments.count())
513 {
545 {
514 Paddr = (int64_t)this->Segments.at(index)->p_paddr;
546 Paddr = (int64_t)this->Segments.at(index)->p_paddr;
515 }
547 }
516 }
548 }
517 return Paddr;
549 return Paddr;
518 }
550 }
519
551
520 int64_t elfparser::getSectionPaddr(int index)
552 int64_t elfparser::getSectionPaddr(int index)
521 {
553 {
522 int64_t Paddr=0;
554 int64_t Paddr=0;
523 if(this->e!=NULL)
555 if(this->e!=NULL)
524 {
556 {
525 if(index < this->sections.count())
557 if(index < this->sections.count())
526 {
558 {
527 Paddr = (int64_t)this->sections.at(index)->section_header->sh_addr;
559 Paddr = (int64_t)this->sections.at(index)->section_header->sh_addr;
528 }
560 }
529 }
561 }
530 return Paddr;
562 return Paddr;
531 }
563 }
532
564
533
565
534 int64_t elfparser::getSegmentFilesz(int index)
566 int64_t elfparser::getSegmentFilesz(int index)
535 {
567 {
536 int64_t FileSz=0;
568 int64_t FileSz=0;
537 if(this->e!=NULL)
569 if(this->e!=NULL)
538 {
570 {
539 if(index < this->Segments.count())
571 if(index < this->Segments.count())
540 {
572 {
541 FileSz = (int64_t)this->Segments.at(index)->p_filesz;
573 FileSz = (int64_t)this->Segments.at(index)->p_filesz;
542 }
574 }
543 }
575 }
544 return FileSz;
576 return FileSz;
545 }
577 }
546
578
547 int64_t elfparser::getSectionDatasz(int index)
579 int64_t elfparser::getSectionDatasz(int index)
548 {
580 {
549 int64_t DataSz=0;
581 int64_t DataSz=0;
550 if(this->e!=NULL)
582 if(this->e!=NULL)
551 {
583 {
552 if(index < this->sections.count())
584 if(index < this->sections.count())
553 {
585 {
554 DataSz = (int64_t)this->sections.at(index)->data->d_size;
586 DataSz = (int64_t)this->sections.at(index)->data->d_size;
555 }
587 }
556 }
588 }
557 return DataSz;
589 return DataSz;
558 }
590 }
559
591
560 bool elfparser::getSectionData(int index, char **buffer)
592 bool elfparser::getSectionData(int index, char **buffer)
561 {
593 {
562 if(this->e!=NULL)
594 if(this->e!=NULL)
563 {
595 {
564 if(index < this->sections.count())
596 if(index < this->sections.count())
565 {
597 {
566 *buffer = (char *)this->sections.at(index)->data->d_buf;
598 *buffer = (char *)this->sections.at(index)->data->d_buf;
567 return true;
599 return true;
568 }
600 }
569 }
601 }
570 return false;
602 return false;
571 }
603 }
572
604
573
605
574 int64_t elfparser::getSegmentMemsz(int index)
606 int64_t elfparser::getSegmentMemsz(int index)
575 {
607 {
576 int64_t MemSz=0;
608 int64_t MemSz=0;
577 if(this->e!=NULL)
609 if(this->e!=NULL)
578 {
610 {
579 if(index < this->Segments.count())
611 if(index < this->Segments.count())
580 {
612 {
581 MemSz = (int64_t)this->Segments.at(index)->p_memsz;
613 MemSz = (int64_t)this->Segments.at(index)->p_memsz;
582 }
614 }
583 }
615 }
584 return MemSz;
616 return MemSz;
585 }
617 }
586
618
587 int64_t elfparser::getSectionMemsz(int index)
619 int64_t elfparser::getSectionMemsz(int index)
588 {
620 {
589 int64_t MemSz=0;
621 int64_t MemSz=0;
590 if(this->e!=NULL)
622 if(this->e!=NULL)
591 {
623 {
592 if(index < this->sections.count())
624 if(index < this->sections.count())
593 {
625 {
594 MemSz = (int64_t)this->sections.at(index)->section_header->sh_size;
626 MemSz = (int64_t)this->sections.at(index)->section_header->sh_size;
595 }
627 }
596 }
628 }
597 return MemSz;
629 return MemSz;
598 }
630 }
599
631
600
632
601 QString elfparser::getSegmentFlags(int index)
633 QString elfparser::getSegmentFlags(int index)
602 {
634 {
603 QString flags("");
635 QString flags("");
604 if(this->e!=NULL)
636 if(this->e!=NULL)
605 {
637 {
606 if(index < this->Segments.count())
638 if(index < this->Segments.count())
607 {
639 {
608 if((this->Segments.at(index)->p_flags&PF_X) == PF_X)flags+="x";
640 if((this->Segments.at(index)->p_flags&PF_X) == PF_X)flags+="x";
609 if((this->Segments.at(index)->p_flags&PF_W) == PF_W)flags+="w";
641 if((this->Segments.at(index)->p_flags&PF_W) == PF_W)flags+="w";
610 if((this->Segments.at(index)->p_flags&PF_R) == PF_R)flags+="r";
642 if((this->Segments.at(index)->p_flags&PF_R) == PF_R)flags+="r";
611 if((this->Segments.at(index)->p_flags&PF_MASKOS) == PF_MASKOS)flags+=" OS-specific";
643 if((this->Segments.at(index)->p_flags&PF_MASKOS) == PF_MASKOS)flags+=" OS-specific";
612 if((this->Segments.at(index)->p_flags&PF_MASKPROC) == PF_MASKPROC)flags+=" Processor-specific";
644 if((this->Segments.at(index)->p_flags&PF_MASKPROC) == PF_MASKPROC)flags+=" Processor-specific";
613 }
645 }
614 }
646 }
615 return flags;
647 return flags;
616 }
648 }
617
649
618
650
619 QString elfparser::getSectionName(int index)
651 QString elfparser::getSectionName(int index)
620 {
652 {
621 char* nameChr = elf_strptr(this->e , this->shstrndx , this->sections.at(index)->section_header->sh_name);
653 char* nameChr = elf_strptr(this->e , this->shstrndx , this->sections.at(index)->section_header->sh_name);
622 return QString(nameChr);
654 return QString(nameChr);
623 }
655 }
624
656
625
657
626 void elfparser::updateSections()
658 void elfparser::updateSections()
627 {
659 {
628 for(int i=0;i<this->sections.count();i++)
660 for(int i=0;i<this->sections.count();i++)
629 {
661 {
630 delete this->sections.at(i);
662 delete this->sections.at(i);
631 }
663 }
632 this->sections.clear();
664 this->sections.clear();
633 this->scn = elf_nextscn (this->e , NULL );
665 this->scn = elf_nextscn (this->e , NULL );
634 this->SectionCount = 0;
666 this->SectionCount = 0;
635 while( this->scn != NULL )
667 while( this->scn != NULL )
636 {
668 {
637 GElf_Shdr* shdr = (GElf_Shdr*)malloc(sizeof(GElf_Shdr));
669 GElf_Shdr* shdr = (GElf_Shdr*)malloc(sizeof(GElf_Shdr));
638 gelf_getshdr ( this->scn , shdr );
670 gelf_getshdr ( this->scn , shdr );
639 Elf_Data* data = elf_getdata(this->scn, NULL);
671 Elf_Data* data = elf_getdata(this->scn, NULL);
640 this->sections.append(new Elf_Section(data,shdr));
672 this->sections.append(new Elf_Section(data,shdr));
641 this->SectionCount+=1;
673 this->SectionCount+=1;
642 this->scn = elf_nextscn(e , scn);
674 this->scn = elf_nextscn(e , scn);
643 }
675 }
644 }
676 }
645
677
646
678
647 void elfparser::updateSegments()
679 void elfparser::updateSegments()
648 {
680 {
649 elf_getphdrnum (this->e , &this->SegmentCount);
681 elf_getphdrnum (this->e , &this->SegmentCount);
650 for(int i=0;i<this->Segments.count();i++)
682 for(int i=0;i<this->Segments.count();i++)
651 {
683 {
652 free(this->Segments.at(i));
684 free(this->Segments.at(i));
653 }
685 }
654 this->Segments.clear();
686 this->Segments.clear();
655 for(int i=0;i<this->SegmentCount;i++)
687 for(int i=0;i<this->SegmentCount;i++)
656 {
688 {
657 GElf_Phdr* header=(GElf_Phdr*)malloc(sizeof(GElf_Phdr));
689 GElf_Phdr* header=(GElf_Phdr*)malloc(sizeof(GElf_Phdr));
658 gelf_getphdr (this->e , i , header );
690 gelf_getphdr (this->e , i , header );
659 this->Segments.append(header);
691 this->Segments.append(header);
660 }
692 }
661 }
693 }
662
694
663
695
664
696
665
697
666
698
667 QString elfparser::getSectionType(int index)
699 QString elfparser::getSectionType(int index)
668 {
700 {
669 QString type("");
701 QString type("");
670 if(this->e!=NULL)
702 if(this->e!=NULL)
671 {
703 {
672 if(index < this->Segments.count())
704 if(index < this->Segments.count())
673 {
705 {
674 switch(this->Segments.at(index)->p_type)
706 switch(this->Segments.at(index)->p_type)
675 {
707 {
676 case SHT_NULL : type = "Section header table entry unused"; break;
708 case SHT_NULL : type = "Section header table entry unused"; break;
677 case SHT_PROGBITS : type = "Program data"; break;
709 case SHT_PROGBITS : type = "Program data"; break;
678 case SHT_SYMTAB : type = "Symbol table"; break;
710 case SHT_SYMTAB : type = "Symbol table"; break;
679 case SHT_STRTAB : type = "String table"; break;
711 case SHT_STRTAB : type = "String table"; break;
680 case SHT_RELA : type = "Relocation entries with addends"; break;
712 case SHT_RELA : type = "Relocation entries with addends"; break;
681 case SHT_HASH : type = "Symbol hash table"; break;
713 case SHT_HASH : type = "Symbol hash table"; break;
682 case SHT_DYNAMIC : type = "Dynamic linking information"; break;
714 case SHT_DYNAMIC : type = "Dynamic linking information"; break;
683 case SHT_NOTE : type = "Notes"; break;
715 case SHT_NOTE : type = "Notes"; break;
684 case SHT_NOBITS :type = "Program space with no data (bss)"; break;
716 case SHT_NOBITS :type = "Program space with no data (bss)"; break;
685 case SHT_REL :type = "Relocation entries, no addends"; break;
717 case SHT_REL :type = "Relocation entries, no addends"; break;
686 case SHT_SHLIB : type = "Reserved"; break;
718 case SHT_SHLIB : type = "Reserved"; break;
687 case SHT_DYNSYM : type = "Dynamic linker symbol table"; break;
719 case SHT_DYNSYM : type = "Dynamic linker symbol table"; break;
688 case SHT_INIT_ARRAY : type = "Array of constructors"; break;
720 case SHT_INIT_ARRAY : type = "Array of constructors"; break;
689 case SHT_FINI_ARRAY : type = "Array of destructors"; break;
721 case SHT_FINI_ARRAY : type = "Array of destructors"; break;
690 case SHT_PREINIT_ARRAY : type = "Array of pre-constructors"; break;
722 case SHT_PREINIT_ARRAY : type = "Array of pre-constructors"; break;
691 case SHT_GROUP : type = "Section group"; break;
723 case SHT_GROUP : type = "Section group"; break;
692 case SHT_SYMTAB_SHNDX : type = "Extended section indeces"; break;
724 case SHT_SYMTAB_SHNDX : type = "Extended section indeces"; break;
693 case SHT_NUM : type = "Number of defined types. "; break;
725 case SHT_NUM : type = "Number of defined types. "; break;
694 case SHT_LOOS : type = "Start OS-specific. "; break;
726 case SHT_LOOS : type = "Start OS-specific. "; break;
695 case SHT_LOSUNW : type = "Sun-specific low bound. "; break;
727 case SHT_LOSUNW : type = "Sun-specific low bound. "; break;
696 case SHT_SUNW_COMDAT : type = " "; break;
728 case SHT_SUNW_COMDAT : type = " "; break;
697 case SHT_SUNW_syminfo : type = " "; break;
729 case SHT_SUNW_syminfo : type = " "; break;
698 case SHT_GNU_verdef : type = "Version definition section. "; break;
730 case SHT_GNU_verdef : type = "Version definition section. "; break;
699 case SHT_GNU_verneed : type = "Version needs section. "; break;
731 case SHT_GNU_verneed : type = "Version needs section. "; break;
700 case SHT_GNU_versym : type = "Version symbol table. "; break;
732 case SHT_GNU_versym : type = "Version symbol table. "; break;
701 case SHT_LOPROC : type = "Start of processor-specific"; break;
733 case SHT_LOPROC : type = "Start of processor-specific"; break;
702 case SHT_HIPROC : type = "End of processor-specific"; break;
734 case SHT_HIPROC : type = "End of processor-specific"; break;
703 case SHT_HIUSER : type = "End of application-specific"; break;
735 case SHT_HIUSER : type = "End of application-specific"; break;
704 }
736 }
705 }
737 }
706 }
738 }
707 return type;
739 return type;
708 }
740 }
709
741
710 bool elfparser::isElf(const QString &File)
742 bool elfparser::isElf(const QString &File)
711 {
743 {
712 int file =0;
744 int file =0;
713 #ifdef _ELF_WINDOWS_
745 #ifdef _ELF_WINDOWS_
714 file = open(File.toStdString().c_str(),O_RDONLY|O_BINARY ,0);
746 file = open(File.toStdString().c_str(),O_RDONLY|O_BINARY ,0);
715 #else
747 #else
716 file = open(File.toStdString().c_str(),O_RDONLY ,0);
748 file = open(File.toStdString().c_str(),O_RDONLY ,0);
717 #endif
749 #endif
718 char Magic[4];
750 char Magic[4];
719 if(file!=-1)
751 if(file!=-1)
720 {
752 {
721 read(file,Magic,4);
753 read(file,Magic,4);
722 close(file);
754 close(file);
723 if(Magic[0]==0x7f && Magic[1]==0x45 && Magic[2]==0x4c && Magic[3]==0x46)
755 if(Magic[0]==0x7f && Magic[1]==0x45 && Magic[2]==0x4c && Magic[3]==0x46)
724 {
756 {
725 return true;
757 return true;
726 }
758 }
727 }
759 }
728 return false;
760 return false;
729 }
761 }
730
762
731
763
732
764
733
765
734
766
735
767
736
768
737
769
@@ -1,99 +1,101
1 /*------------------------------------------------------------------------------
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SocExplorer Software
2 -- This file is a part of the SocExplorer Software
3 -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS
3 -- Copyright (C) 2013, Plasma Physics Laboratory - CNRS
4 --
4 --
5 -- This program is free software; you can redistribute it and/or modify
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
8 -- (at your option) any later version.
9 --
9 --
10 -- This program is distributed in the hope that it will be useful,
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
13 -- GNU General Public License for more details.
14 --
14 --
15 -- You should have received a copy of the GNU General Public License
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
20 -- Mail : alexis.jeandet@lpp.polytechnique.fr
21 ----------------------------------------------------------------------------*/
21 ----------------------------------------------------------------------------*/
22 #ifndef ELFPARSER_H
22 #ifndef ELFPARSER_H
23 #define ELFPARSER_H
23 #define ELFPARSER_H
24 #include <libelf.h>
24 #include <libelf.h>
25 #include <gelf.h>
25 #include <gelf.h>
26 #include <QString>
26 #include <QString>
27 #include <stdio.h>
27 #include <stdio.h>
28 #include <QList>
28 #include <QList>
29 #include <stdint.h>
29 #include <stdint.h>
30
30
31 class Elf_Section
31 class Elf_Section
32 {
32 {
33 public:
33 public:
34 Elf_Section(){}
34 Elf_Section(){}
35 Elf_Section(Elf_Data* data,GElf_Shdr* section_header)
35 Elf_Section(Elf_Data* data,GElf_Shdr* section_header)
36 {
36 {
37 this->data = data;
37 this->data = data;
38 this->section_header = section_header;
38 this->section_header = section_header;
39 }
39 }
40 Elf_Data* data;
40 Elf_Data* data;
41 GElf_Shdr* section_header;
41 GElf_Shdr* section_header;
42 };
42 };
43
43
44 class elfparser
44 class elfparser
45 {
45 {
46 public:
46 public:
47 elfparser();
47 elfparser();
48 bool iself();
48 bool iself();
49 bool isopened();
49 bool isopened();
50 int setFilename(const QString& name);
50 int setFilename(const QString& name);
51 int closeFile();
51 int closeFile();
52 QString getClass();
52 QString getClass();
53 QString getArchitecture();
53 QString getArchitecture();
54 QString getType();
54 QString getType();
55 QString getEndianness();
55 QString getEndianness();
56 QString getABI();
56 int32_t getVersion();
57 int32_t getVersion();
58 int64_t getEntryPointAddress();
57 int getSectioncount();
59 int getSectioncount();
58 int getSegmentcount();
60 int getSegmentcount();
59 QString getSegmentType(int index);
61 QString getSegmentType(int index);
60 int64_t getSegmentOffset(int index);
62 int64_t getSegmentOffset(int index);
61 int64_t getSegmentVaddr(int index);
63 int64_t getSegmentVaddr(int index);
62 int64_t getSegmentPaddr(int index);
64 int64_t getSegmentPaddr(int index);
63 int64_t getSectionPaddr(int index);
65 int64_t getSectionPaddr(int index);
64 int64_t getSegmentFilesz(int index);
66 int64_t getSegmentFilesz(int index);
65 int64_t getSectionDatasz(int index);
67 int64_t getSectionDatasz(int index);
66 bool getSectionData(int index, char **buffer);
68 bool getSectionData(int index, char **buffer);
67 int64_t getSegmentMemsz(int index);
69 int64_t getSegmentMemsz(int index);
68 int64_t getSectionMemsz(int index);
70 int64_t getSectionMemsz(int index);
69 QString getSegmentFlags(int index);
71 QString getSegmentFlags(int index);
70 QString getSectionName(int index);
72 QString getSectionName(int index);
71 QString getSectionType(int index);
73 QString getSectionType(int index);
72 static bool isElf(const QString& File);
74 static bool isElf(const QString& File);
73
75
74 private:
76 private:
75 void updateSections();
77 void updateSections();
76 void updateSegments();
78 void updateSegments();
77 int elfFile;
79 int elfFile;
78 bool opened;
80 bool opened;
79 bool type_elf;
81 bool type_elf;
80 Elf* e;
82 Elf* e;
81 Elf_Kind ek;
83 Elf_Kind ek;
82 GElf_Ehdr ehdr;
84 GElf_Ehdr ehdr;
83 Elf_Scn * scn;
85 Elf_Scn * scn;
84 Elf_Data * data;
86 Elf_Data * data;
85 size_t SectionCount,SegmentCount, shstrndx;
87 size_t SectionCount,SegmentCount, shstrndx;
86 QList<GElf_Phdr*> Segments;
88 QList<GElf_Phdr*> Segments;
87 QList<Elf_Section*> sections;
89 QList<Elf_Section*> sections;
88
90
89 };
91 };
90
92
91 #endif // ELFPARSER_H
93 #endif // ELFPARSER_H
92
94
93
95
94
96
95
97
96
98
97
99
98
100
99
101
@@ -1,524 +1,571
1 #include "PySocExplorer0.h"
1 #include "PySocExplorer0.h"
2 #include <PythonQtConversion.h>
2 #include <PythonQtConversion.h>
3 #include <PythonQtMethodInfo.h>
3 #include <PythonQtMethodInfo.h>
4 #include <PythonQtSignalReceiver.h>
4 #include <PythonQtSignalReceiver.h>
5 #include <QVariant>
5 #include <QVariant>
6 #include <elffile.h>
7
8 ElfFile* PythonQtWrapper_ElfFile::new_ElfFile(QObject* parent)
9 {
10 return new ElfFile(parent); }
11
12 ElfFile* PythonQtWrapper_ElfFile::new_ElfFile(const QString& File, QObject* parent)
13 {
14 return new ElfFile(File, parent); }
15
16 int PythonQtWrapper_ElfFile::closeFile(ElfFile* theWrappedObject)
17 {
18 return ( theWrappedObject->closeFile());
19 }
20
21 bool PythonQtWrapper_ElfFile::isopened(ElfFile* theWrappedObject)
22 {
23 return ( theWrappedObject->isopened());
24 }
25
26 bool PythonQtWrapper_ElfFile::openFile(ElfFile* theWrappedObject, const QString& File)
27 {
28 return ( theWrappedObject->openFile(File));
29 }
30
31
6
32
7 MemSizeWdgt* PythonQtWrapper_MemSizeWdgt::new_MemSizeWdgt(QWidget* parent)
33 MemSizeWdgt* PythonQtWrapper_MemSizeWdgt::new_MemSizeWdgt(QWidget* parent)
8 {
34 {
9 return new MemSizeWdgt(parent); }
35 return new MemSizeWdgt(parent); }
10
36
11 MemSizeWdgt* PythonQtWrapper_MemSizeWdgt::new_MemSizeWdgt(int defaultSize, QWidget* parent)
37 MemSizeWdgt* PythonQtWrapper_MemSizeWdgt::new_MemSizeWdgt(int defaultSize, QWidget* parent)
12 {
38 {
13 return new MemSizeWdgt(defaultSize, parent); }
39 return new MemSizeWdgt(defaultSize, parent); }
14
40
15 int PythonQtWrapper_MemSizeWdgt::getsize(MemSizeWdgt* theWrappedObject)
41 int PythonQtWrapper_MemSizeWdgt::getsize(MemSizeWdgt* theWrappedObject)
16 {
42 {
17 return ( theWrappedObject->getsize());
43 return ( theWrappedObject->getsize());
18 }
44 }
19
45
20 void PythonQtWrapper_MemSizeWdgt::setMaximum(MemSizeWdgt* theWrappedObject, unsigned int max)
46 void PythonQtWrapper_MemSizeWdgt::setMaximum(MemSizeWdgt* theWrappedObject, unsigned int max)
21 {
47 {
22 ( theWrappedObject->setMaximum(max));
48 ( theWrappedObject->setMaximum(max));
23 }
49 }
24
50
25 void PythonQtWrapper_MemSizeWdgt::show(MemSizeWdgt* theWrappedObject)
51 void PythonQtWrapper_MemSizeWdgt::show(MemSizeWdgt* theWrappedObject)
26 {
52 {
27 ( theWrappedObject->show());
53 ( theWrappedObject->show());
28 }
54 }
29
55
30 void PythonQtWrapper_MemSizeWdgt::updateSizeValue(MemSizeWdgt* theWrappedObject)
56 void PythonQtWrapper_MemSizeWdgt::updateSizeValue(MemSizeWdgt* theWrappedObject)
31 {
57 {
32 ( theWrappedObject->updateSizeValue());
58 ( theWrappedObject->updateSizeValue());
33 }
59 }
34
60
35
61
36
62
37 PythonQtShell_QHexEdit::~PythonQtShell_QHexEdit() {
63 PythonQtShell_QHexEdit::~PythonQtShell_QHexEdit() {
38 PythonQtPrivate* priv = PythonQt::priv();
64 PythonQtPrivate* priv = PythonQt::priv();
39 if (priv) { priv->shellClassDeleted(this); }
65 if (priv) { priv->shellClassDeleted(this); }
40 }
66 }
41 QHexEdit* PythonQtWrapper_QHexEdit::new_QHexEdit(QWidget* parent)
67 QHexEdit* PythonQtWrapper_QHexEdit::new_QHexEdit(QWidget* parent)
42 {
68 {
43 return new PythonQtShell_QHexEdit(parent); }
69 return new PythonQtShell_QHexEdit(parent); }
44
70
45 QColor PythonQtWrapper_QHexEdit::addressAreaColor(QHexEdit* theWrappedObject)
71 QColor PythonQtWrapper_QHexEdit::addressAreaColor(QHexEdit* theWrappedObject)
46 {
72 {
47 return ( theWrappedObject->addressAreaColor());
73 return ( theWrappedObject->addressAreaColor());
48 }
74 }
49
75
50 int PythonQtWrapper_QHexEdit::addressOffset(QHexEdit* theWrappedObject)
76 int PythonQtWrapper_QHexEdit::addressOffset(QHexEdit* theWrappedObject)
51 {
77 {
52 return ( theWrappedObject->addressOffset());
78 return ( theWrappedObject->addressOffset());
53 }
79 }
54
80
55 int PythonQtWrapper_QHexEdit::cursorPosition(QHexEdit* theWrappedObject)
81 int PythonQtWrapper_QHexEdit::cursorPosition(QHexEdit* theWrappedObject)
56 {
82 {
57 return ( theWrappedObject->cursorPosition());
83 return ( theWrappedObject->cursorPosition());
58 }
84 }
59
85
60 QByteArray PythonQtWrapper_QHexEdit::data(QHexEdit* theWrappedObject)
86 QByteArray PythonQtWrapper_QHexEdit::data(QHexEdit* theWrappedObject)
61 {
87 {
62 return ( theWrappedObject->data());
88 return ( theWrappedObject->data());
63 }
89 }
64
90
65 const QFont* PythonQtWrapper_QHexEdit::font(QHexEdit* theWrappedObject) const
91 const QFont* PythonQtWrapper_QHexEdit::font(QHexEdit* theWrappedObject) const
66 {
92 {
67 return &( theWrappedObject->font());
93 return &( theWrappedObject->font());
68 }
94 }
69
95
70 QColor PythonQtWrapper_QHexEdit::highlightingColor(QHexEdit* theWrappedObject)
96 QColor PythonQtWrapper_QHexEdit::highlightingColor(QHexEdit* theWrappedObject)
71 {
97 {
72 return ( theWrappedObject->highlightingColor());
98 return ( theWrappedObject->highlightingColor());
73 }
99 }
74
100
75 int PythonQtWrapper_QHexEdit::indexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from) const
101 int PythonQtWrapper_QHexEdit::indexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from) const
76 {
102 {
77 return ( theWrappedObject->indexOf(ba, from));
103 return ( theWrappedObject->indexOf(ba, from));
78 }
104 }
79
105
80 void PythonQtWrapper_QHexEdit::insert(QHexEdit* theWrappedObject, int i, char ch)
106 void PythonQtWrapper_QHexEdit::insert(QHexEdit* theWrappedObject, int i, char ch)
81 {
107 {
82 ( theWrappedObject->insert(i, ch));
108 ( theWrappedObject->insert(i, ch));
83 }
109 }
84
110
85 void PythonQtWrapper_QHexEdit::insert(QHexEdit* theWrappedObject, int i, const QByteArray& ba)
111 void PythonQtWrapper_QHexEdit::insert(QHexEdit* theWrappedObject, int i, const QByteArray& ba)
86 {
112 {
87 ( theWrappedObject->insert(i, ba));
113 ( theWrappedObject->insert(i, ba));
88 }
114 }
89
115
90 bool PythonQtWrapper_QHexEdit::isReadOnly(QHexEdit* theWrappedObject)
116 bool PythonQtWrapper_QHexEdit::isReadOnly(QHexEdit* theWrappedObject)
91 {
117 {
92 return ( theWrappedObject->isReadOnly());
118 return ( theWrappedObject->isReadOnly());
93 }
119 }
94
120
95 int PythonQtWrapper_QHexEdit::lastIndexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from) const
121 int PythonQtWrapper_QHexEdit::lastIndexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from) const
96 {
122 {
97 return ( theWrappedObject->lastIndexOf(ba, from));
123 return ( theWrappedObject->lastIndexOf(ba, from));
98 }
124 }
99
125
100 bool PythonQtWrapper_QHexEdit::overwriteMode(QHexEdit* theWrappedObject)
126 bool PythonQtWrapper_QHexEdit::overwriteMode(QHexEdit* theWrappedObject)
101 {
127 {
102 return ( theWrappedObject->overwriteMode());
128 return ( theWrappedObject->overwriteMode());
103 }
129 }
104
130
105 void PythonQtWrapper_QHexEdit::remove(QHexEdit* theWrappedObject, int pos, int len)
131 void PythonQtWrapper_QHexEdit::remove(QHexEdit* theWrappedObject, int pos, int len)
106 {
132 {
107 ( theWrappedObject->remove(pos, len));
133 ( theWrappedObject->remove(pos, len));
108 }
134 }
109
135
110 void PythonQtWrapper_QHexEdit::replace(QHexEdit* theWrappedObject, int pos, int len, const QByteArray& after)
136 void PythonQtWrapper_QHexEdit::replace(QHexEdit* theWrappedObject, int pos, int len, const QByteArray& after)
111 {
137 {
112 ( theWrappedObject->replace(pos, len, after));
138 ( theWrappedObject->replace(pos, len, after));
113 }
139 }
114
140
115 QColor PythonQtWrapper_QHexEdit::selectionColor(QHexEdit* theWrappedObject)
141 QColor PythonQtWrapper_QHexEdit::selectionColor(QHexEdit* theWrappedObject)
116 {
142 {
117 return ( theWrappedObject->selectionColor());
143 return ( theWrappedObject->selectionColor());
118 }
144 }
119
145
120 QString PythonQtWrapper_QHexEdit::selectionToReadableString(QHexEdit* theWrappedObject)
146 QString PythonQtWrapper_QHexEdit::selectionToReadableString(QHexEdit* theWrappedObject)
121 {
147 {
122 return ( theWrappedObject->selectionToReadableString());
148 return ( theWrappedObject->selectionToReadableString());
123 }
149 }
124
150
125 void PythonQtWrapper_QHexEdit::setAddressAreaColor(QHexEdit* theWrappedObject, const QColor& color)
151 void PythonQtWrapper_QHexEdit::setAddressAreaColor(QHexEdit* theWrappedObject, const QColor& color)
126 {
152 {
127 ( theWrappedObject->setAddressAreaColor(color));
153 ( theWrappedObject->setAddressAreaColor(color));
128 }
154 }
129
155
130 void PythonQtWrapper_QHexEdit::setAddressOffset(QHexEdit* theWrappedObject, int offset)
156 void PythonQtWrapper_QHexEdit::setAddressOffset(QHexEdit* theWrappedObject, int offset)
131 {
157 {
132 ( theWrappedObject->setAddressOffset(offset));
158 ( theWrappedObject->setAddressOffset(offset));
133 }
159 }
134
160
135 void PythonQtWrapper_QHexEdit::setCursorPosition(QHexEdit* theWrappedObject, int cusorPos)
161 void PythonQtWrapper_QHexEdit::setCursorPosition(QHexEdit* theWrappedObject, int cusorPos)
136 {
162 {
137 ( theWrappedObject->setCursorPosition(cusorPos));
163 ( theWrappedObject->setCursorPosition(cusorPos));
138 }
164 }
139
165
140 void PythonQtWrapper_QHexEdit::setData(QHexEdit* theWrappedObject, const QByteArray& data)
166 void PythonQtWrapper_QHexEdit::setData(QHexEdit* theWrappedObject, const QByteArray& data)
141 {
167 {
142 ( theWrappedObject->setData(data));
168 ( theWrappedObject->setData(data));
143 }
169 }
144
170
145 void PythonQtWrapper_QHexEdit::setFont(QHexEdit* theWrappedObject, const QFont& arg__1)
171 void PythonQtWrapper_QHexEdit::setFont(QHexEdit* theWrappedObject, const QFont& arg__1)
146 {
172 {
147 ( theWrappedObject->setFont(arg__1));
173 ( theWrappedObject->setFont(arg__1));
148 }
174 }
149
175
150 void PythonQtWrapper_QHexEdit::setHighlightingColor(QHexEdit* theWrappedObject, const QColor& color)
176 void PythonQtWrapper_QHexEdit::setHighlightingColor(QHexEdit* theWrappedObject, const QColor& color)
151 {
177 {
152 ( theWrappedObject->setHighlightingColor(color));
178 ( theWrappedObject->setHighlightingColor(color));
153 }
179 }
154
180
155 void PythonQtWrapper_QHexEdit::setOverwriteMode(QHexEdit* theWrappedObject, bool arg__1)
181 void PythonQtWrapper_QHexEdit::setOverwriteMode(QHexEdit* theWrappedObject, bool arg__1)
156 {
182 {
157 ( theWrappedObject->setOverwriteMode(arg__1));
183 ( theWrappedObject->setOverwriteMode(arg__1));
158 }
184 }
159
185
160 void PythonQtWrapper_QHexEdit::setReadOnly(QHexEdit* theWrappedObject, bool arg__1)
186 void PythonQtWrapper_QHexEdit::setReadOnly(QHexEdit* theWrappedObject, bool arg__1)
161 {
187 {
162 ( theWrappedObject->setReadOnly(arg__1));
188 ( theWrappedObject->setReadOnly(arg__1));
163 }
189 }
164
190
165 void PythonQtWrapper_QHexEdit::setSelectionColor(QHexEdit* theWrappedObject, const QColor& color)
191 void PythonQtWrapper_QHexEdit::setSelectionColor(QHexEdit* theWrappedObject, const QColor& color)
166 {
192 {
167 ( theWrappedObject->setSelectionColor(color));
193 ( theWrappedObject->setSelectionColor(color));
168 }
194 }
169
195
170 QString PythonQtWrapper_QHexEdit::toReadableString(QHexEdit* theWrappedObject)
196 QString PythonQtWrapper_QHexEdit::toReadableString(QHexEdit* theWrappedObject)
171 {
197 {
172 return ( theWrappedObject->toReadableString());
198 return ( theWrappedObject->toReadableString());
173 }
199 }
174
200
175
201
176
202
177 QHexSpinBox* PythonQtWrapper_QHexSpinBox::new_QHexSpinBox(QWidget* parent)
203 QHexSpinBox* PythonQtWrapper_QHexSpinBox::new_QHexSpinBox(QWidget* parent)
178 {
204 {
179 return new QHexSpinBox(parent); }
205 return new QHexSpinBox(parent); }
180
206
181 void PythonQtWrapper_QHexSpinBox::show(QHexSpinBox* theWrappedObject)
207 void PythonQtWrapper_QHexSpinBox::show(QHexSpinBox* theWrappedObject)
182 {
208 {
183 ( theWrappedObject->show());
209 ( theWrappedObject->show());
184 }
210 }
185
211
186 QString PythonQtWrapper_QHexSpinBox::textFromValue(QHexSpinBox* theWrappedObject, int value) const
212 QString PythonQtWrapper_QHexSpinBox::textFromValue(QHexSpinBox* theWrappedObject, int value) const
187 {
213 {
188 return ( theWrappedObject->textFromValue(value));
214 return ( theWrappedObject->textFromValue(value));
189 }
215 }
190
216
191 QValidator::State PythonQtWrapper_QHexSpinBox::validate(QHexSpinBox* theWrappedObject, QString& input, int& pos) const
217 QValidator::State PythonQtWrapper_QHexSpinBox::validate(QHexSpinBox* theWrappedObject, QString& input, int& pos) const
192 {
218 {
193 return ( theWrappedObject->validate(input, pos));
219 return ( theWrappedObject->validate(input, pos));
194 }
220 }
195
221
196 int PythonQtWrapper_QHexSpinBox::valueFromText(QHexSpinBox* theWrappedObject, const QString& text) const
222 int PythonQtWrapper_QHexSpinBox::valueFromText(QHexSpinBox* theWrappedObject, const QString& text) const
197 {
223 {
198 return ( theWrappedObject->valueFromText(text));
224 return ( theWrappedObject->valueFromText(text));
199 }
225 }
200
226
201
227
202
228
203 PythonQtShell_SocExplorerPlot::~PythonQtShell_SocExplorerPlot() {
229 PythonQtShell_SocExplorerPlot::~PythonQtShell_SocExplorerPlot() {
204 PythonQtPrivate* priv = PythonQt::priv();
230 PythonQtPrivate* priv = PythonQt::priv();
205 if (priv) { priv->shellClassDeleted(this); }
231 if (priv) { priv->shellClassDeleted(this); }
206 }
232 }
207 SocExplorerPlot* PythonQtWrapper_SocExplorerPlot::new_SocExplorerPlot(QWidget* parent)
233 SocExplorerPlot* PythonQtWrapper_SocExplorerPlot::new_SocExplorerPlot(QWidget* parent)
208 {
234 {
209 return new PythonQtShell_SocExplorerPlot(parent); }
235 return new PythonQtShell_SocExplorerPlot(parent); }
210
236
211 int PythonQtWrapper_SocExplorerPlot::addGraph(SocExplorerPlot* theWrappedObject)
237 int PythonQtWrapper_SocExplorerPlot::addGraph(SocExplorerPlot* theWrappedObject)
212 {
238 {
213 return ( theWrappedObject->addGraph());
239 return ( theWrappedObject->addGraph());
214 }
240 }
215
241
216 void PythonQtWrapper_SocExplorerPlot::addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y)
242 void PythonQtWrapper_SocExplorerPlot::addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y)
217 {
243 {
218 ( theWrappedObject->addGraphData(graphIndex, x, y));
244 ( theWrappedObject->addGraphData(graphIndex, x, y));
219 }
245 }
220
246
221 void PythonQtWrapper_SocExplorerPlot::addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QVariant x, QVariant y)
247 void PythonQtWrapper_SocExplorerPlot::addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QVariant x, QVariant y)
222 {
248 {
223 ( theWrappedObject->addGraphData(graphIndex, x, y));
249 ( theWrappedObject->addGraphData(graphIndex, x, y));
224 }
250 }
225
251
226 QPen PythonQtWrapper_SocExplorerPlot::getGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex)
252 QPen PythonQtWrapper_SocExplorerPlot::getGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex)
227 {
253 {
228 return ( theWrappedObject->getGraphPen(graphIndex));
254 return ( theWrappedObject->getGraphPen(graphIndex));
229 }
255 }
230
256
231 void PythonQtWrapper_SocExplorerPlot::rescaleAxis(SocExplorerPlot* theWrappedObject)
257 void PythonQtWrapper_SocExplorerPlot::rescaleAxis(SocExplorerPlot* theWrappedObject)
232 {
258 {
233 ( theWrappedObject->rescaleAxis());
259 ( theWrappedObject->rescaleAxis());
234 }
260 }
235
261
236 void PythonQtWrapper_SocExplorerPlot::setAdaptativeSampling(SocExplorerPlot* theWrappedObject, int graphIndex, bool enable)
262 void PythonQtWrapper_SocExplorerPlot::setAdaptativeSampling(SocExplorerPlot* theWrappedObject, int graphIndex, bool enable)
237 {
263 {
238 ( theWrappedObject->setAdaptativeSampling(graphIndex, enable));
264 ( theWrappedObject->setAdaptativeSampling(graphIndex, enable));
239 }
265 }
240
266
241 void PythonQtWrapper_SocExplorerPlot::setGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y)
267 void PythonQtWrapper_SocExplorerPlot::setGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y)
242 {
268 {
243 ( theWrappedObject->setGraphData(graphIndex, x, y));
269 ( theWrappedObject->setGraphData(graphIndex, x, y));
244 }
270 }
245
271
246 void PythonQtWrapper_SocExplorerPlot::setGraphLineStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString lineStyle)
272 void PythonQtWrapper_SocExplorerPlot::setGraphLineStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString lineStyle)
247 {
273 {
248 ( theWrappedObject->setGraphLineStyle(graphIndex, lineStyle));
274 ( theWrappedObject->setGraphLineStyle(graphIndex, lineStyle));
249 }
275 }
250
276
251 void PythonQtWrapper_SocExplorerPlot::setGraphName(SocExplorerPlot* theWrappedObject, int graphIndex, QString name)
277 void PythonQtWrapper_SocExplorerPlot::setGraphName(SocExplorerPlot* theWrappedObject, int graphIndex, QString name)
252 {
278 {
253 ( theWrappedObject->setGraphName(graphIndex, name));
279 ( theWrappedObject->setGraphName(graphIndex, name));
254 }
280 }
255
281
256 void PythonQtWrapper_SocExplorerPlot::setGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex, QPen pen)
282 void PythonQtWrapper_SocExplorerPlot::setGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex, QPen pen)
257 {
283 {
258 ( theWrappedObject->setGraphPen(graphIndex, pen));
284 ( theWrappedObject->setGraphPen(graphIndex, pen));
259 }
285 }
260
286
261 void PythonQtWrapper_SocExplorerPlot::setGraphScatterStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString scatterStyle)
287 void PythonQtWrapper_SocExplorerPlot::setGraphScatterStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString scatterStyle)
262 {
288 {
263 ( theWrappedObject->setGraphScatterStyle(graphIndex, scatterStyle));
289 ( theWrappedObject->setGraphScatterStyle(graphIndex, scatterStyle));
264 }
290 }
265
291
266 void PythonQtWrapper_SocExplorerPlot::setLegendFont(SocExplorerPlot* theWrappedObject, QFont font)
292 void PythonQtWrapper_SocExplorerPlot::setLegendFont(SocExplorerPlot* theWrappedObject, QFont font)
267 {
293 {
268 ( theWrappedObject->setLegendFont(font));
294 ( theWrappedObject->setLegendFont(font));
269 }
295 }
270
296
271 void PythonQtWrapper_SocExplorerPlot::setLegendSelectedFont(SocExplorerPlot* theWrappedObject, QFont font)
297 void PythonQtWrapper_SocExplorerPlot::setLegendSelectedFont(SocExplorerPlot* theWrappedObject, QFont font)
272 {
298 {
273 ( theWrappedObject->setLegendSelectedFont(font));
299 ( theWrappedObject->setLegendSelectedFont(font));
274 }
300 }
275
301
276 void PythonQtWrapper_SocExplorerPlot::setTitle(SocExplorerPlot* theWrappedObject, QString title)
302 void PythonQtWrapper_SocExplorerPlot::setTitle(SocExplorerPlot* theWrappedObject, QString title)
277 {
303 {
278 ( theWrappedObject->setTitle(title));
304 ( theWrappedObject->setTitle(title));
279 }
305 }
280
306
281 void PythonQtWrapper_SocExplorerPlot::setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label)
307 void PythonQtWrapper_SocExplorerPlot::setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label)
282 {
308 {
283 ( theWrappedObject->setXaxisLabel(label));
309 ( theWrappedObject->setXaxisLabel(label));
284 }
310 }
285
311
286 void PythonQtWrapper_SocExplorerPlot::setXaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper)
312 void PythonQtWrapper_SocExplorerPlot::setXaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper)
287 {
313 {
288 ( theWrappedObject->setXaxisRange(lower, upper));
314 ( theWrappedObject->setXaxisRange(lower, upper));
289 }
315 }
290
316
291 void PythonQtWrapper_SocExplorerPlot::setYaxisLabel(SocExplorerPlot* theWrappedObject, QString label)
317 void PythonQtWrapper_SocExplorerPlot::setYaxisLabel(SocExplorerPlot* theWrappedObject, QString label)
292 {
318 {
293 ( theWrappedObject->setYaxisLabel(label));
319 ( theWrappedObject->setYaxisLabel(label));
294 }
320 }
295
321
296 void PythonQtWrapper_SocExplorerPlot::setYaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper)
322 void PythonQtWrapper_SocExplorerPlot::setYaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper)
297 {
323 {
298 ( theWrappedObject->setYaxisRange(lower, upper));
324 ( theWrappedObject->setYaxisRange(lower, upper));
299 }
325 }
300
326
301 void PythonQtWrapper_SocExplorerPlot::show(SocExplorerPlot* theWrappedObject)
327 void PythonQtWrapper_SocExplorerPlot::show(SocExplorerPlot* theWrappedObject)
302 {
328 {
303 ( theWrappedObject->show());
329 ( theWrappedObject->show());
304 }
330 }
305
331
306
332
307
333
308 TCP_Terminal_Client* PythonQtWrapper_TCP_Terminal_Client::new_TCP_Terminal_Client(QObject* parent)
334 TCP_Terminal_Client* PythonQtWrapper_TCP_Terminal_Client::new_TCP_Terminal_Client(QObject* parent)
309 {
335 {
310 return new TCP_Terminal_Client(parent); }
336 return new TCP_Terminal_Client(parent); }
311
337
312 void PythonQtWrapper_TCP_Terminal_Client::connectToServer(TCP_Terminal_Client* theWrappedObject)
338 void PythonQtWrapper_TCP_Terminal_Client::connectToServer(TCP_Terminal_Client* theWrappedObject)
313 {
339 {
314 ( theWrappedObject->connectToServer());
340 ( theWrappedObject->connectToServer());
315 }
341 }
316
342
317 void PythonQtWrapper_TCP_Terminal_Client::connectToServer(TCP_Terminal_Client* theWrappedObject, const QString& IP, int port)
343 void PythonQtWrapper_TCP_Terminal_Client::connectToServer(TCP_Terminal_Client* theWrappedObject, const QString& IP, int port)
318 {
344 {
319 ( theWrappedObject->connectToServer(IP, port));
345 ( theWrappedObject->connectToServer(IP, port));
320 }
346 }
321
347
322 bool PythonQtWrapper_TCP_Terminal_Client::isConnected(TCP_Terminal_Client* theWrappedObject)
348 bool PythonQtWrapper_TCP_Terminal_Client::isConnected(TCP_Terminal_Client* theWrappedObject)
323 {
349 {
324 return ( theWrappedObject->isConnected());
350 return ( theWrappedObject->isConnected());
325 }
351 }
326
352
327 void PythonQtWrapper_TCP_Terminal_Client::sendText(TCP_Terminal_Client* theWrappedObject, const QString& text)
353 void PythonQtWrapper_TCP_Terminal_Client::sendText(TCP_Terminal_Client* theWrappedObject, const QString& text)
328 {
354 {
329 ( theWrappedObject->sendText(text));
355 ( theWrappedObject->sendText(text));
330 }
356 }
331
357
332 void PythonQtWrapper_TCP_Terminal_Client::startServer(TCP_Terminal_Client* theWrappedObject)
358 void PythonQtWrapper_TCP_Terminal_Client::startServer(TCP_Terminal_Client* theWrappedObject)
333 {
359 {
334 ( theWrappedObject->startServer());
360 ( theWrappedObject->startServer());
335 }
361 }
336
362
337 void PythonQtWrapper_TCP_Terminal_Client::startServer(TCP_Terminal_Client* theWrappedObject, int port)
363 void PythonQtWrapper_TCP_Terminal_Client::startServer(TCP_Terminal_Client* theWrappedObject, int port)
338 {
364 {
339 ( theWrappedObject->startServer(port));
365 ( theWrappedObject->startServer(port));
340 }
366 }
341
367
342
368
343
369
344 XByteArray* PythonQtWrapper_XByteArray::new_XByteArray()
370 XByteArray* PythonQtWrapper_XByteArray::new_XByteArray()
345 {
371 {
346 return new XByteArray(); }
372 return new XByteArray(); }
347
373
348 int PythonQtWrapper_XByteArray::addressOffset(XByteArray* theWrappedObject)
374 int PythonQtWrapper_XByteArray::addressOffset(XByteArray* theWrappedObject)
349 {
375 {
350 return ( theWrappedObject->addressOffset());
376 return ( theWrappedObject->addressOffset());
351 }
377 }
352
378
353 int PythonQtWrapper_XByteArray::addressWidth(XByteArray* theWrappedObject)
379 int PythonQtWrapper_XByteArray::addressWidth(XByteArray* theWrappedObject)
354 {
380 {
355 return ( theWrappedObject->addressWidth());
381 return ( theWrappedObject->addressWidth());
356 }
382 }
357
383
358 QChar PythonQtWrapper_XByteArray::asciiChar(XByteArray* theWrappedObject, int index)
384 QChar PythonQtWrapper_XByteArray::asciiChar(XByteArray* theWrappedObject, int index)
359 {
385 {
360 return ( theWrappedObject->asciiChar(index));
386 return ( theWrappedObject->asciiChar(index));
361 }
387 }
362
388
363 QByteArray* PythonQtWrapper_XByteArray::data(XByteArray* theWrappedObject)
389 QByteArray* PythonQtWrapper_XByteArray::data(XByteArray* theWrappedObject)
364 {
390 {
365 return &( theWrappedObject->data());
391 return &( theWrappedObject->data());
366 }
392 }
367
393
368 bool PythonQtWrapper_XByteArray::dataChanged(XByteArray* theWrappedObject, int i)
394 bool PythonQtWrapper_XByteArray::dataChanged(XByteArray* theWrappedObject, int i)
369 {
395 {
370 return ( theWrappedObject->dataChanged(i));
396 return ( theWrappedObject->dataChanged(i));
371 }
397 }
372
398
373 QByteArray PythonQtWrapper_XByteArray::dataChanged(XByteArray* theWrappedObject, int i, int len)
399 QByteArray PythonQtWrapper_XByteArray::dataChanged(XByteArray* theWrappedObject, int i, int len)
374 {
400 {
375 return ( theWrappedObject->dataChanged(i, len));
401 return ( theWrappedObject->dataChanged(i, len));
376 }
402 }
377
403
378 QByteArray* PythonQtWrapper_XByteArray::insert(XByteArray* theWrappedObject, int i, char ch)
404 QByteArray* PythonQtWrapper_XByteArray::insert(XByteArray* theWrappedObject, int i, char ch)
379 {
405 {
380 return &( theWrappedObject->insert(i, ch));
406 return &( theWrappedObject->insert(i, ch));
381 }
407 }
382
408
383 QByteArray* PythonQtWrapper_XByteArray::insert(XByteArray* theWrappedObject, int i, const QByteArray& ba)
409 QByteArray* PythonQtWrapper_XByteArray::insert(XByteArray* theWrappedObject, int i, const QByteArray& ba)
384 {
410 {
385 return &( theWrappedObject->insert(i, ba));
411 return &( theWrappedObject->insert(i, ba));
386 }
412 }
387
413
388 int PythonQtWrapper_XByteArray::realAddressNumbers(XByteArray* theWrappedObject)
414 int PythonQtWrapper_XByteArray::realAddressNumbers(XByteArray* theWrappedObject)
389 {
415 {
390 return ( theWrappedObject->realAddressNumbers());
416 return ( theWrappedObject->realAddressNumbers());
391 }
417 }
392
418
393 QByteArray* PythonQtWrapper_XByteArray::remove(XByteArray* theWrappedObject, int pos, int len)
419 QByteArray* PythonQtWrapper_XByteArray::remove(XByteArray* theWrappedObject, int pos, int len)
394 {
420 {
395 return &( theWrappedObject->remove(pos, len));
421 return &( theWrappedObject->remove(pos, len));
396 }
422 }
397
423
398 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, char ch)
424 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, char ch)
399 {
425 {
400 return &( theWrappedObject->replace(index, ch));
426 return &( theWrappedObject->replace(index, ch));
401 }
427 }
402
428
403 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, const QByteArray& ba)
429 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, const QByteArray& ba)
404 {
430 {
405 return &( theWrappedObject->replace(index, ba));
431 return &( theWrappedObject->replace(index, ba));
406 }
432 }
407
433
408 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, int length, const QByteArray& ba)
434 QByteArray* PythonQtWrapper_XByteArray::replace(XByteArray* theWrappedObject, int index, int length, const QByteArray& ba)
409 {
435 {
410 return &( theWrappedObject->replace(index, length, ba));
436 return &( theWrappedObject->replace(index, length, ba));
411 }
437 }
412
438
413 void PythonQtWrapper_XByteArray::setAddressOffset(XByteArray* theWrappedObject, int offset)
439 void PythonQtWrapper_XByteArray::setAddressOffset(XByteArray* theWrappedObject, int offset)
414 {
440 {
415 ( theWrappedObject->setAddressOffset(offset));
441 ( theWrappedObject->setAddressOffset(offset));
416 }
442 }
417
443
418 void PythonQtWrapper_XByteArray::setAddressWidth(XByteArray* theWrappedObject, int width)
444 void PythonQtWrapper_XByteArray::setAddressWidth(XByteArray* theWrappedObject, int width)
419 {
445 {
420 ( theWrappedObject->setAddressWidth(width));
446 ( theWrappedObject->setAddressWidth(width));
421 }
447 }
422
448
423 void PythonQtWrapper_XByteArray::setData(XByteArray* theWrappedObject, QByteArray data)
449 void PythonQtWrapper_XByteArray::setData(XByteArray* theWrappedObject, QByteArray data)
424 {
450 {
425 ( theWrappedObject->setData(data));
451 ( theWrappedObject->setData(data));
426 }
452 }
427
453
428 void PythonQtWrapper_XByteArray::setDataChanged(XByteArray* theWrappedObject, int i, bool state)
454 void PythonQtWrapper_XByteArray::setDataChanged(XByteArray* theWrappedObject, int i, bool state)
429 {
455 {
430 ( theWrappedObject->setDataChanged(i, state));
456 ( theWrappedObject->setDataChanged(i, state));
431 }
457 }
432
458
433 void PythonQtWrapper_XByteArray::setDataChanged(XByteArray* theWrappedObject, int i, const QByteArray& state)
459 void PythonQtWrapper_XByteArray::setDataChanged(XByteArray* theWrappedObject, int i, const QByteArray& state)
434 {
460 {
435 ( theWrappedObject->setDataChanged(i, state));
461 ( theWrappedObject->setDataChanged(i, state));
436 }
462 }
437
463
438 int PythonQtWrapper_XByteArray::size(XByteArray* theWrappedObject)
464 int PythonQtWrapper_XByteArray::size(XByteArray* theWrappedObject)
439 {
465 {
440 return ( theWrappedObject->size());
466 return ( theWrappedObject->size());
441 }
467 }
442
468
443 QString PythonQtWrapper_XByteArray::toRedableString(XByteArray* theWrappedObject, int start, int end)
469 QString PythonQtWrapper_XByteArray::toRedableString(XByteArray* theWrappedObject, int start, int end)
444 {
470 {
445 return ( theWrappedObject->toRedableString(start, end));
471 return ( theWrappedObject->toRedableString(start, end));
446 }
472 }
447
473
448
474
449
475
476 elfFileWidget* PythonQtWrapper_elfFileWidget::new_elfFileWidget(QWidget* parent)
477 {
478 return new elfFileWidget(parent); }
479
480
481
450 elfparser* PythonQtWrapper_elfparser::new_elfparser()
482 elfparser* PythonQtWrapper_elfparser::new_elfparser()
451 {
483 {
452 return new elfparser(); }
484 return new elfparser(); }
453
485
454 int PythonQtWrapper_elfparser::closeFile(elfparser* theWrappedObject)
486 int PythonQtWrapper_elfparser::closeFile(elfparser* theWrappedObject)
455 {
487 {
456 return ( theWrappedObject->closeFile());
488 return ( theWrappedObject->closeFile());
457 }
489 }
458
490
491 QString PythonQtWrapper_elfparser::getABI(elfparser* theWrappedObject)
492 {
493 return ( theWrappedObject->getABI());
494 }
495
459 QString PythonQtWrapper_elfparser::getArchitecture(elfparser* theWrappedObject)
496 QString PythonQtWrapper_elfparser::getArchitecture(elfparser* theWrappedObject)
460 {
497 {
461 return ( theWrappedObject->getArchitecture());
498 return ( theWrappedObject->getArchitecture());
462 }
499 }
463
500
501 QString PythonQtWrapper_elfparser::getClass(elfparser* theWrappedObject)
502 {
503 return ( theWrappedObject->getClass());
504 }
505
506 QString PythonQtWrapper_elfparser::getEndianness(elfparser* theWrappedObject)
507 {
508 return ( theWrappedObject->getEndianness());
509 }
510
464 bool PythonQtWrapper_elfparser::getSectionData(elfparser* theWrappedObject, int index, char** buffer)
511 bool PythonQtWrapper_elfparser::getSectionData(elfparser* theWrappedObject, int index, char** buffer)
465 {
512 {
466 return ( theWrappedObject->getSectionData(index, buffer));
513 return ( theWrappedObject->getSectionData(index, buffer));
467 }
514 }
468
515
469 QString PythonQtWrapper_elfparser::getSectionName(elfparser* theWrappedObject, int index)
516 QString PythonQtWrapper_elfparser::getSectionName(elfparser* theWrappedObject, int index)
470 {
517 {
471 return ( theWrappedObject->getSectionName(index));
518 return ( theWrappedObject->getSectionName(index));
472 }
519 }
473
520
474 QString PythonQtWrapper_elfparser::getSectionType(elfparser* theWrappedObject, int index)
521 QString PythonQtWrapper_elfparser::getSectionType(elfparser* theWrappedObject, int index)
475 {
522 {
476 return ( theWrappedObject->getSectionType(index));
523 return ( theWrappedObject->getSectionType(index));
477 }
524 }
478
525
479 int PythonQtWrapper_elfparser::getSectioncount(elfparser* theWrappedObject)
526 int PythonQtWrapper_elfparser::getSectioncount(elfparser* theWrappedObject)
480 {
527 {
481 return ( theWrappedObject->getSectioncount());
528 return ( theWrappedObject->getSectioncount());
482 }
529 }
483
530
484 QString PythonQtWrapper_elfparser::getSegmentFlags(elfparser* theWrappedObject, int index)
531 QString PythonQtWrapper_elfparser::getSegmentFlags(elfparser* theWrappedObject, int index)
485 {
532 {
486 return ( theWrappedObject->getSegmentFlags(index));
533 return ( theWrappedObject->getSegmentFlags(index));
487 }
534 }
488
535
489 QString PythonQtWrapper_elfparser::getSegmentType(elfparser* theWrappedObject, int index)
536 QString PythonQtWrapper_elfparser::getSegmentType(elfparser* theWrappedObject, int index)
490 {
537 {
491 return ( theWrappedObject->getSegmentType(index));
538 return ( theWrappedObject->getSegmentType(index));
492 }
539 }
493
540
494 int PythonQtWrapper_elfparser::getSegmentcount(elfparser* theWrappedObject)
541 int PythonQtWrapper_elfparser::getSegmentcount(elfparser* theWrappedObject)
495 {
542 {
496 return ( theWrappedObject->getSegmentcount());
543 return ( theWrappedObject->getSegmentcount());
497 }
544 }
498
545
499 QString PythonQtWrapper_elfparser::getType(elfparser* theWrappedObject)
546 QString PythonQtWrapper_elfparser::getType(elfparser* theWrappedObject)
500 {
547 {
501 return ( theWrappedObject->getType());
548 return ( theWrappedObject->getType());
502 }
549 }
503
550
504 bool PythonQtWrapper_elfparser::static_elfparser_isElf(const QString& File)
551 bool PythonQtWrapper_elfparser::static_elfparser_isElf(const QString& File)
505 {
552 {
506 return (elfparser::isElf(File));
553 return (elfparser::isElf(File));
507 }
554 }
508
555
509 bool PythonQtWrapper_elfparser::iself(elfparser* theWrappedObject)
556 bool PythonQtWrapper_elfparser::iself(elfparser* theWrappedObject)
510 {
557 {
511 return ( theWrappedObject->iself());
558 return ( theWrappedObject->iself());
512 }
559 }
513
560
514 bool PythonQtWrapper_elfparser::isopened(elfparser* theWrappedObject)
561 bool PythonQtWrapper_elfparser::isopened(elfparser* theWrappedObject)
515 {
562 {
516 return ( theWrappedObject->isopened());
563 return ( theWrappedObject->isopened());
517 }
564 }
518
565
519 int PythonQtWrapper_elfparser::setFilename(elfparser* theWrappedObject, const QString& name)
566 int PythonQtWrapper_elfparser::setFilename(elfparser* theWrappedObject, const QString& name)
520 {
567 {
521 return ( theWrappedObject->setFilename(name));
568 return ( theWrappedObject->setFilename(name));
522 }
569 }
523
570
524
571
@@ -1,210 +1,243
1 #include <PythonQt.h>
1 #include <PythonQt.h>
2 #include <QObject>
2 #include <QObject>
3 #include <QVariant>
3 #include <QVariant>
4 #include <SocExplorerPlot.h>
4 #include <SocExplorerPlot.h>
5 #include <elffile.h>
6 #include <elffilewidget.h>
5 #include <elfparser.h>
7 #include <elfparser.h>
6 #include <memsizewdgt.h>
8 #include <memsizewdgt.h>
7 #include <qhexedit.h>
9 #include <qhexedit.h>
8 #include <qhexspinbox.h>
10 #include <qhexspinbox.h>
9 #include <tcp_terminal_client.h>
11 #include <tcp_terminal_client.h>
10 #include <xbytearray.h>
12 #include <xbytearray.h>
11
13
12
14
13
15
16 class PythonQtWrapper_ElfFile : public QObject
17 { Q_OBJECT
18 public:
19 public slots:
20 ElfFile* new_ElfFile(QObject* parent = 0);
21 ElfFile* new_ElfFile(const QString& File, QObject* parent = 0);
22 void delete_ElfFile(ElfFile* obj) { delete obj; }
23 int closeFile(ElfFile* theWrappedObject);
24 bool isopened(ElfFile* theWrappedObject);
25 bool openFile(ElfFile* theWrappedObject, const QString& File);
26 };
27
28
29
30
31
14 class PythonQtWrapper_MemSizeWdgt : public QObject
32 class PythonQtWrapper_MemSizeWdgt : public QObject
15 { Q_OBJECT
33 { Q_OBJECT
16 public:
34 public:
17 public slots:
35 public slots:
18 MemSizeWdgt* new_MemSizeWdgt(QWidget* parent = 0);
36 MemSizeWdgt* new_MemSizeWdgt(QWidget* parent = 0);
19 MemSizeWdgt* new_MemSizeWdgt(int defaultSize, QWidget* parent = 0);
37 MemSizeWdgt* new_MemSizeWdgt(int defaultSize, QWidget* parent = 0);
20 void delete_MemSizeWdgt(MemSizeWdgt* obj) { delete obj; }
38 void delete_MemSizeWdgt(MemSizeWdgt* obj) { delete obj; }
21 int getsize(MemSizeWdgt* theWrappedObject);
39 int getsize(MemSizeWdgt* theWrappedObject);
22 void setMaximum(MemSizeWdgt* theWrappedObject, unsigned int max);
40 void setMaximum(MemSizeWdgt* theWrappedObject, unsigned int max);
23 void show(MemSizeWdgt* theWrappedObject);
41 void show(MemSizeWdgt* theWrappedObject);
24 void updateSizeValue(MemSizeWdgt* theWrappedObject);
42 void updateSizeValue(MemSizeWdgt* theWrappedObject);
25 };
43 };
26
44
27
45
28
46
29
47
30
48
31 class PythonQtShell_QHexEdit : public QHexEdit
49 class PythonQtShell_QHexEdit : public QHexEdit
32 {
50 {
33 public:
51 public:
34 PythonQtShell_QHexEdit(QWidget* parent = 0):QHexEdit(parent),_wrapper(NULL) {};
52 PythonQtShell_QHexEdit(QWidget* parent = 0):QHexEdit(parent),_wrapper(NULL) {};
35
53
36 ~PythonQtShell_QHexEdit();
54 ~PythonQtShell_QHexEdit();
37
55
38
56
39 PythonQtInstanceWrapper* _wrapper;
57 PythonQtInstanceWrapper* _wrapper;
40 };
58 };
41
59
42 class PythonQtWrapper_QHexEdit : public QObject
60 class PythonQtWrapper_QHexEdit : public QObject
43 { Q_OBJECT
61 { Q_OBJECT
44 public:
62 public:
45 public slots:
63 public slots:
46 QHexEdit* new_QHexEdit(QWidget* parent = 0);
64 QHexEdit* new_QHexEdit(QWidget* parent = 0);
47 void delete_QHexEdit(QHexEdit* obj) { delete obj; }
65 void delete_QHexEdit(QHexEdit* obj) { delete obj; }
48 QColor addressAreaColor(QHexEdit* theWrappedObject);
66 QColor addressAreaColor(QHexEdit* theWrappedObject);
49 int addressOffset(QHexEdit* theWrappedObject);
67 int addressOffset(QHexEdit* theWrappedObject);
50 int cursorPosition(QHexEdit* theWrappedObject);
68 int cursorPosition(QHexEdit* theWrappedObject);
51 QByteArray data(QHexEdit* theWrappedObject);
69 QByteArray data(QHexEdit* theWrappedObject);
52 const QFont* font(QHexEdit* theWrappedObject) const;
70 const QFont* font(QHexEdit* theWrappedObject) const;
53 QColor highlightingColor(QHexEdit* theWrappedObject);
71 QColor highlightingColor(QHexEdit* theWrappedObject);
54 int indexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from = 0) const;
72 int indexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from = 0) const;
55 void insert(QHexEdit* theWrappedObject, int i, char ch);
73 void insert(QHexEdit* theWrappedObject, int i, char ch);
56 void insert(QHexEdit* theWrappedObject, int i, const QByteArray& ba);
74 void insert(QHexEdit* theWrappedObject, int i, const QByteArray& ba);
57 bool isReadOnly(QHexEdit* theWrappedObject);
75 bool isReadOnly(QHexEdit* theWrappedObject);
58 int lastIndexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from = 0) const;
76 int lastIndexOf(QHexEdit* theWrappedObject, const QByteArray& ba, int from = 0) const;
59 bool overwriteMode(QHexEdit* theWrappedObject);
77 bool overwriteMode(QHexEdit* theWrappedObject);
60 void remove(QHexEdit* theWrappedObject, int pos, int len = 1);
78 void remove(QHexEdit* theWrappedObject, int pos, int len = 1);
61 void replace(QHexEdit* theWrappedObject, int pos, int len, const QByteArray& after);
79 void replace(QHexEdit* theWrappedObject, int pos, int len, const QByteArray& after);
62 QColor selectionColor(QHexEdit* theWrappedObject);
80 QColor selectionColor(QHexEdit* theWrappedObject);
63 QString selectionToReadableString(QHexEdit* theWrappedObject);
81 QString selectionToReadableString(QHexEdit* theWrappedObject);
64 void setAddressAreaColor(QHexEdit* theWrappedObject, const QColor& color);
82 void setAddressAreaColor(QHexEdit* theWrappedObject, const QColor& color);
65 void setAddressOffset(QHexEdit* theWrappedObject, int offset);
83 void setAddressOffset(QHexEdit* theWrappedObject, int offset);
66 void setCursorPosition(QHexEdit* theWrappedObject, int cusorPos);
84 void setCursorPosition(QHexEdit* theWrappedObject, int cusorPos);
67 void setData(QHexEdit* theWrappedObject, const QByteArray& data);
85 void setData(QHexEdit* theWrappedObject, const QByteArray& data);
68 void setFont(QHexEdit* theWrappedObject, const QFont& arg__1);
86 void setFont(QHexEdit* theWrappedObject, const QFont& arg__1);
69 void setHighlightingColor(QHexEdit* theWrappedObject, const QColor& color);
87 void setHighlightingColor(QHexEdit* theWrappedObject, const QColor& color);
70 void setOverwriteMode(QHexEdit* theWrappedObject, bool arg__1);
88 void setOverwriteMode(QHexEdit* theWrappedObject, bool arg__1);
71 void setReadOnly(QHexEdit* theWrappedObject, bool arg__1);
89 void setReadOnly(QHexEdit* theWrappedObject, bool arg__1);
72 void setSelectionColor(QHexEdit* theWrappedObject, const QColor& color);
90 void setSelectionColor(QHexEdit* theWrappedObject, const QColor& color);
73 QString toReadableString(QHexEdit* theWrappedObject);
91 QString toReadableString(QHexEdit* theWrappedObject);
74 };
92 };
75
93
76
94
77
95
78
96
79
97
80 class PythonQtWrapper_QHexSpinBox : public QObject
98 class PythonQtWrapper_QHexSpinBox : public QObject
81 { Q_OBJECT
99 { Q_OBJECT
82 public:
100 public:
83 public slots:
101 public slots:
84 QHexSpinBox* new_QHexSpinBox(QWidget* parent = 0);
102 QHexSpinBox* new_QHexSpinBox(QWidget* parent = 0);
85 void delete_QHexSpinBox(QHexSpinBox* obj) { delete obj; }
103 void delete_QHexSpinBox(QHexSpinBox* obj) { delete obj; }
86 void show(QHexSpinBox* theWrappedObject);
104 void show(QHexSpinBox* theWrappedObject);
87 QString textFromValue(QHexSpinBox* theWrappedObject, int value) const;
105 QString textFromValue(QHexSpinBox* theWrappedObject, int value) const;
88 QValidator::State validate(QHexSpinBox* theWrappedObject, QString& input, int& pos) const;
106 QValidator::State validate(QHexSpinBox* theWrappedObject, QString& input, int& pos) const;
89 int valueFromText(QHexSpinBox* theWrappedObject, const QString& text) const;
107 int valueFromText(QHexSpinBox* theWrappedObject, const QString& text) const;
90 };
108 };
91
109
92
110
93
111
94
112
95
113
96 class PythonQtShell_SocExplorerPlot : public SocExplorerPlot
114 class PythonQtShell_SocExplorerPlot : public SocExplorerPlot
97 {
115 {
98 public:
116 public:
99 PythonQtShell_SocExplorerPlot(QWidget* parent = 0):SocExplorerPlot(parent),_wrapper(NULL) {};
117 PythonQtShell_SocExplorerPlot(QWidget* parent = 0):SocExplorerPlot(parent),_wrapper(NULL) {};
100
118
101 ~PythonQtShell_SocExplorerPlot();
119 ~PythonQtShell_SocExplorerPlot();
102
120
103
121
104 PythonQtInstanceWrapper* _wrapper;
122 PythonQtInstanceWrapper* _wrapper;
105 };
123 };
106
124
107 class PythonQtWrapper_SocExplorerPlot : public QObject
125 class PythonQtWrapper_SocExplorerPlot : public QObject
108 { Q_OBJECT
126 { Q_OBJECT
109 public:
127 public:
110 public slots:
128 public slots:
111 SocExplorerPlot* new_SocExplorerPlot(QWidget* parent = 0);
129 SocExplorerPlot* new_SocExplorerPlot(QWidget* parent = 0);
112 void delete_SocExplorerPlot(SocExplorerPlot* obj) { delete obj; }
130 void delete_SocExplorerPlot(SocExplorerPlot* obj) { delete obj; }
113 int addGraph(SocExplorerPlot* theWrappedObject);
131 int addGraph(SocExplorerPlot* theWrappedObject);
114 void addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y);
132 void addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y);
115 void addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QVariant x, QVariant y);
133 void addGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QVariant x, QVariant y);
116 QPen getGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex);
134 QPen getGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex);
117 void rescaleAxis(SocExplorerPlot* theWrappedObject);
135 void rescaleAxis(SocExplorerPlot* theWrappedObject);
118 void setAdaptativeSampling(SocExplorerPlot* theWrappedObject, int graphIndex, bool enable);
136 void setAdaptativeSampling(SocExplorerPlot* theWrappedObject, int graphIndex, bool enable);
119 void setGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y);
137 void setGraphData(SocExplorerPlot* theWrappedObject, int graphIndex, QList<QVariant > x, QList<QVariant > y);
120 void setGraphLineStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString lineStyle);
138 void setGraphLineStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString lineStyle);
121 void setGraphName(SocExplorerPlot* theWrappedObject, int graphIndex, QString name);
139 void setGraphName(SocExplorerPlot* theWrappedObject, int graphIndex, QString name);
122 void setGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex, QPen pen);
140 void setGraphPen(SocExplorerPlot* theWrappedObject, int graphIndex, QPen pen);
123 void setGraphScatterStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString scatterStyle);
141 void setGraphScatterStyle(SocExplorerPlot* theWrappedObject, int graphIndex, QString scatterStyle);
124 void setLegendFont(SocExplorerPlot* theWrappedObject, QFont font);
142 void setLegendFont(SocExplorerPlot* theWrappedObject, QFont font);
125 void setLegendSelectedFont(SocExplorerPlot* theWrappedObject, QFont font);
143 void setLegendSelectedFont(SocExplorerPlot* theWrappedObject, QFont font);
126 void setTitle(SocExplorerPlot* theWrappedObject, QString title);
144 void setTitle(SocExplorerPlot* theWrappedObject, QString title);
127 void setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label);
145 void setXaxisLabel(SocExplorerPlot* theWrappedObject, QString label);
128 void setXaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper);
146 void setXaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper);
129 void setYaxisLabel(SocExplorerPlot* theWrappedObject, QString label);
147 void setYaxisLabel(SocExplorerPlot* theWrappedObject, QString label);
130 void setYaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper);
148 void setYaxisRange(SocExplorerPlot* theWrappedObject, double lower, double upper);
131 void show(SocExplorerPlot* theWrappedObject);
149 void show(SocExplorerPlot* theWrappedObject);
132 };
150 };
133
151
134
152
135
153
136
154
137
155
138 class PythonQtWrapper_TCP_Terminal_Client : public QObject
156 class PythonQtWrapper_TCP_Terminal_Client : public QObject
139 { Q_OBJECT
157 { Q_OBJECT
140 public:
158 public:
141 public slots:
159 public slots:
142 TCP_Terminal_Client* new_TCP_Terminal_Client(QObject* parent = 0);
160 TCP_Terminal_Client* new_TCP_Terminal_Client(QObject* parent = 0);
143 void delete_TCP_Terminal_Client(TCP_Terminal_Client* obj) { delete obj; }
161 void delete_TCP_Terminal_Client(TCP_Terminal_Client* obj) { delete obj; }
144 void connectToServer(TCP_Terminal_Client* theWrappedObject);
162 void connectToServer(TCP_Terminal_Client* theWrappedObject);
145 void connectToServer(TCP_Terminal_Client* theWrappedObject, const QString& IP, int port);
163 void connectToServer(TCP_Terminal_Client* theWrappedObject, const QString& IP, int port);
146 bool isConnected(TCP_Terminal_Client* theWrappedObject);
164 bool isConnected(TCP_Terminal_Client* theWrappedObject);
147 void sendText(TCP_Terminal_Client* theWrappedObject, const QString& text);
165 void sendText(TCP_Terminal_Client* theWrappedObject, const QString& text);
148 void startServer(TCP_Terminal_Client* theWrappedObject);
166 void startServer(TCP_Terminal_Client* theWrappedObject);
149 void startServer(TCP_Terminal_Client* theWrappedObject, int port);
167 void startServer(TCP_Terminal_Client* theWrappedObject, int port);
150 };
168 };
151
169
152
170
153
171
154
172
155
173
156 class PythonQtWrapper_XByteArray : public QObject
174 class PythonQtWrapper_XByteArray : public QObject
157 { Q_OBJECT
175 { Q_OBJECT
158 public:
176 public:
159 public slots:
177 public slots:
160 XByteArray* new_XByteArray();
178 XByteArray* new_XByteArray();
161 void delete_XByteArray(XByteArray* obj) { delete obj; }
179 void delete_XByteArray(XByteArray* obj) { delete obj; }
162 int addressOffset(XByteArray* theWrappedObject);
180 int addressOffset(XByteArray* theWrappedObject);
163 int addressWidth(XByteArray* theWrappedObject);
181 int addressWidth(XByteArray* theWrappedObject);
164 QChar asciiChar(XByteArray* theWrappedObject, int index);
182 QChar asciiChar(XByteArray* theWrappedObject, int index);
165 QByteArray* data(XByteArray* theWrappedObject);
183 QByteArray* data(XByteArray* theWrappedObject);
166 bool dataChanged(XByteArray* theWrappedObject, int i);
184 bool dataChanged(XByteArray* theWrappedObject, int i);
167 QByteArray dataChanged(XByteArray* theWrappedObject, int i, int len);
185 QByteArray dataChanged(XByteArray* theWrappedObject, int i, int len);
168 QByteArray* insert(XByteArray* theWrappedObject, int i, char ch);
186 QByteArray* insert(XByteArray* theWrappedObject, int i, char ch);
169 QByteArray* insert(XByteArray* theWrappedObject, int i, const QByteArray& ba);
187 QByteArray* insert(XByteArray* theWrappedObject, int i, const QByteArray& ba);
170 int realAddressNumbers(XByteArray* theWrappedObject);
188 int realAddressNumbers(XByteArray* theWrappedObject);
171 QByteArray* remove(XByteArray* theWrappedObject, int pos, int len);
189 QByteArray* remove(XByteArray* theWrappedObject, int pos, int len);
172 QByteArray* replace(XByteArray* theWrappedObject, int index, char ch);
190 QByteArray* replace(XByteArray* theWrappedObject, int index, char ch);
173 QByteArray* replace(XByteArray* theWrappedObject, int index, const QByteArray& ba);
191 QByteArray* replace(XByteArray* theWrappedObject, int index, const QByteArray& ba);
174 QByteArray* replace(XByteArray* theWrappedObject, int index, int length, const QByteArray& ba);
192 QByteArray* replace(XByteArray* theWrappedObject, int index, int length, const QByteArray& ba);
175 void setAddressOffset(XByteArray* theWrappedObject, int offset);
193 void setAddressOffset(XByteArray* theWrappedObject, int offset);
176 void setAddressWidth(XByteArray* theWrappedObject, int width);
194 void setAddressWidth(XByteArray* theWrappedObject, int width);
177 void setData(XByteArray* theWrappedObject, QByteArray data);
195 void setData(XByteArray* theWrappedObject, QByteArray data);
178 void setDataChanged(XByteArray* theWrappedObject, int i, bool state);
196 void setDataChanged(XByteArray* theWrappedObject, int i, bool state);
179 void setDataChanged(XByteArray* theWrappedObject, int i, const QByteArray& state);
197 void setDataChanged(XByteArray* theWrappedObject, int i, const QByteArray& state);
180 int size(XByteArray* theWrappedObject);
198 int size(XByteArray* theWrappedObject);
181 QString toRedableString(XByteArray* theWrappedObject, int start = 0, int end = -1);
199 QString toRedableString(XByteArray* theWrappedObject, int start = 0, int end = -1);
182 };
200 };
183
201
184
202
185
203
186
204
187
205
206 class PythonQtWrapper_elfFileWidget : public QObject
207 { Q_OBJECT
208 public:
209 public slots:
210 elfFileWidget* new_elfFileWidget(QWidget* parent = 0);
211 void delete_elfFileWidget(elfFileWidget* obj) { delete obj; }
212 };
213
214
215
216
217
188 class PythonQtWrapper_elfparser : public QObject
218 class PythonQtWrapper_elfparser : public QObject
189 { Q_OBJECT
219 { Q_OBJECT
190 public:
220 public:
191 public slots:
221 public slots:
192 elfparser* new_elfparser();
222 elfparser* new_elfparser();
193 void delete_elfparser(elfparser* obj) { delete obj; }
223 void delete_elfparser(elfparser* obj) { delete obj; }
194 int closeFile(elfparser* theWrappedObject);
224 int closeFile(elfparser* theWrappedObject);
225 QString getABI(elfparser* theWrappedObject);
195 QString getArchitecture(elfparser* theWrappedObject);
226 QString getArchitecture(elfparser* theWrappedObject);
227 QString getClass(elfparser* theWrappedObject);
228 QString getEndianness(elfparser* theWrappedObject);
196 bool getSectionData(elfparser* theWrappedObject, int index, char** buffer);
229 bool getSectionData(elfparser* theWrappedObject, int index, char** buffer);
197 QString getSectionName(elfparser* theWrappedObject, int index);
230 QString getSectionName(elfparser* theWrappedObject, int index);
198 QString getSectionType(elfparser* theWrappedObject, int index);
231 QString getSectionType(elfparser* theWrappedObject, int index);
199 int getSectioncount(elfparser* theWrappedObject);
232 int getSectioncount(elfparser* theWrappedObject);
200 QString getSegmentFlags(elfparser* theWrappedObject, int index);
233 QString getSegmentFlags(elfparser* theWrappedObject, int index);
201 QString getSegmentType(elfparser* theWrappedObject, int index);
234 QString getSegmentType(elfparser* theWrappedObject, int index);
202 int getSegmentcount(elfparser* theWrappedObject);
235 int getSegmentcount(elfparser* theWrappedObject);
203 QString getType(elfparser* theWrappedObject);
236 QString getType(elfparser* theWrappedObject);
204 bool static_elfparser_isElf(const QString& File);
237 bool static_elfparser_isElf(const QString& File);
205 bool iself(elfparser* theWrappedObject);
238 bool iself(elfparser* theWrappedObject);
206 bool isopened(elfparser* theWrappedObject);
239 bool isopened(elfparser* theWrappedObject);
207 int setFilename(elfparser* theWrappedObject, const QString& name);
240 int setFilename(elfparser* theWrappedObject, const QString& name);
208 };
241 };
209
242
210
243
@@ -1,14 +1,16
1 #include <PythonQt.h>
1 #include <PythonQt.h>
2 #include "PySocExplorer0.h"
2 #include "PySocExplorer0.h"
3
3
4
4
5 void PythonQt_init_PySocExplorer(PyObject* module) {
5 void PythonQt_init_PySocExplorer(PyObject* module) {
6 PythonQt::priv()->registerClass(&ElfFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_ElfFile>, NULL, module, 0);
6 PythonQt::priv()->registerCPPClass("MemSizeWdgt", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_MemSizeWdgt>, NULL, module, 0);
7 PythonQt::priv()->registerCPPClass("MemSizeWdgt", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_MemSizeWdgt>, NULL, module, 0);
7 PythonQt::priv()->registerCPPClass("QHexEdit", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexEdit>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexEdit>, module, 0);
8 PythonQt::priv()->registerCPPClass("QHexEdit", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexEdit>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexEdit>, module, 0);
8 PythonQt::priv()->registerCPPClass("QHexSpinBox", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexSpinBox>, NULL, module, 0);
9 PythonQt::priv()->registerCPPClass("QHexSpinBox", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexSpinBox>, NULL, module, 0);
9 PythonQt::priv()->registerCPPClass("SocExplorerPlot", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_SocExplorerPlot>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_SocExplorerPlot>, module, 0);
10 PythonQt::priv()->registerCPPClass("SocExplorerPlot", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_SocExplorerPlot>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_SocExplorerPlot>, module, 0);
10 PythonQt::priv()->registerClass(&TCP_Terminal_Client::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_TCP_Terminal_Client>, NULL, module, 0);
11 PythonQt::priv()->registerClass(&TCP_Terminal_Client::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_TCP_Terminal_Client>, NULL, module, 0);
11 PythonQt::priv()->registerCPPClass("XByteArray", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_XByteArray>, NULL, module, 0);
12 PythonQt::priv()->registerCPPClass("XByteArray", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_XByteArray>, NULL, module, 0);
13 PythonQt::priv()->registerCPPClass("elfFileWidget", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfFileWidget>, NULL, module, 0);
12 PythonQt::priv()->registerCPPClass("elfparser", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfparser>, NULL, module, 0);
14 PythonQt::priv()->registerCPPClass("elfparser", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfparser>, NULL, module, 0);
13
15
14 }
16 }
@@ -1,30 +1,34
1 <typesystem package="PySocExplorer" default-superclass="com.trolltech.qt.QtJambiObject">
1 <typesystem package="PySocExplorer" default-superclass="com.trolltech.qt.QtJambiObject">
2 <load-typesystem name=":/trolltech/generator/typesystem_core.txt" generate="no" />
2 <load-typesystem name=":/trolltech/generator/typesystem_core.txt" generate="yes" />
3 <load-typesystem name=":/trolltech/generator/typesystem_gui.txt" generate="no" />
3 <load-typesystem name=":/trolltech/generator/typesystem_gui.txt" generate="yes" />
4 <load-typesystem name=":/trolltech/generator/typesystem_sql.txt" generate="no" />
4 <load-typesystem name=":/trolltech/generator/typesystem_sql.txt" generate="no" />
5 <load-typesystem name=":/trolltech/generator/typesystem_opengl.txt" generate="no" />
5 <load-typesystem name=":/trolltech/generator/typesystem_opengl.txt" generate="no" />
6 <load-typesystem name=":/trolltech/generator/typesystem_svg.txt" generate="no" />
6 <load-typesystem name=":/trolltech/generator/typesystem_svg.txt" generate="no" />
7 <load-typesystem name=":/trolltech/generator/typesystem_network.txt" generate="no" />
7 <load-typesystem name=":/trolltech/generator/typesystem_network.txt" generate="no" />
8 <load-typesystem name=":/trolltech/generator/typesystem_xml.txt" generate="no" />
8 <load-typesystem name=":/trolltech/generator/typesystem_xml.txt" generate="no" />
9 <load-typesystem name=":/trolltech/generator/typesystem_xmlpatterns.txt" generate="no" />
9 <load-typesystem name=":/trolltech/generator/typesystem_xmlpatterns.txt" generate="no" />
10 <load-typesystem name=":/trolltech/generator/typesystem_webkit.txt" generate="no" />
10 <load-typesystem name=":/trolltech/generator/typesystem_webkit.txt" generate="no" />
11 <load-typesystem name=":/trolltech/generator/typesystem_phonon.txt" generate="no" />
11 <load-typesystem name=":/trolltech/generator/typesystem_phonon.txt" generate="no" />
12
12
13 <rejection class="abstractExecFile" />
13
14
14 <object-type name="QHexSpinBox" />
15 <object-type name="QHexSpinBox" />
15 <object-type name="MemSizeWdgt" />
16 <object-type name="MemSizeWdgt" />
16 <object-type name="QHexEdit" />
17 <object-type name="QHexEdit" />
17 <object-type name="XByteArray" />
18 <object-type name="XByteArray" />
18 <object-type name="SocExplorerPlot" />
19 <object-type name="SocExplorerPlot" />
19 <object-type name="TCP_Terminal_Client" />
20 <object-type name="TCP_Terminal_Client" />
20 <object-type name="elfparser" />
21 <object-type name="elfparser" />
22 <object-type name="abstractExecFile" />
23 <object-type name="ElfFile" />
24 <object-type name="elfFileWidget" />
21
25
22 </typesystem>
26 </typesystem>
23
27
24
28
25
29
26
30
27
31
28
32
29
33
30
34
@@ -1,6 +1,6
1 #!/bin/bash
1 #!/bin/bash
2
2
3 #export QTDIR=/usr/include
3 #export QTDIR=/usr/include
4 export QTDIR=/usr/include/qt5
4 export QTDIR=/usr/include/qt5
5
5
6 pythonqt_generator --output-directory=pythonQtOut PySocExplorer.h pythonQtgeneratorCfg.txt
6 pythonqt_generator --dump-object-tree --output-directory=pythonQtOut PySocExplorer.h pythonQtgeneratorCfg.txt
General Comments 0
You need to be logged in to leave comments. Login now