Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SandBox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
PotatoGim
SandBox
Commits
4aceaad1
Commit
4aceaad1
authored
Aug 21, 2016
by
PotatoGim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C++: 가상 테이블 디버깅
parent
8938e170
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1931 additions
and
0 deletions
+1931
-0
c++/debug_vtable/test.cxx
c++/debug_vtable/test.cxx
+63
-0
c++/debug_vtable/test.cxx.002t.class
c++/debug_vtable/test.cxx.002t.class
+1868
-0
No files found.
c++/debug_vtable/test.cxx
0 → 100644
View file @
4aceaad1
/*!
* ===========================================================================
* @file test.cxx
* @brief
* @author Ji-Hyeon Gim <potatogim@potatogim.net>
* @date 2015년 09월 04일 14시 13분 03초
* @version 1.0
* @copyright Copyleft (c) 2015, Ji-Hyeon Gim
* @license GNU General Public License v3
* ===========================================================================
*/
#include <iostream>
#pragma pack(1)
struct
base1
{
virtual
void
m1
()
{}
};
struct
base2
{
virtual
void
m2
()
{}
};
struct
base3
{
virtual
void
m3
()
{}
};
struct
base4
{
virtual
void
m4
()
{}
};
struct
base5
{
virtual
void
m5
()
{}
};
struct
cls1
:
base2
,
base1
,
base3
{
virtual
void
c1
()
{}
};
struct
cls2
:
base4
,
base5
{
virtual
void
c2
()
{}
};
struct
cls
:
cls1
,
cls2
{
virtual
void
m7
()
{}
};
int
main
(
int
argc
,
char
**
argv
)
{
std
::
cout
<<
sizeof
(
int
)
<<
std
::
endl
;
// 4
std
::
cout
<<
sizeof
(
struct
base1
)
<<
std
::
endl
;
// 8
std
::
cout
<<
sizeof
(
struct
base2
)
<<
std
::
endl
;
// 8
std
::
cout
<<
sizeof
(
struct
base3
)
<<
std
::
endl
;
// 8
std
::
cout
<<
sizeof
(
struct
base4
)
<<
std
::
endl
;
// 8
std
::
cout
<<
sizeof
(
struct
base5
)
<<
std
::
endl
;
// 8
std
::
cout
<<
sizeof
(
struct
cls1
)
<<
std
::
endl
;
// 16
std
::
cout
<<
sizeof
(
struct
cls2
)
<<
std
::
endl
;
// 16
std
::
cout
<<
sizeof
(
struct
cls
)
<<
std
::
endl
;
// 16
return
0
;
}
c++/debug_vtable/test.cxx.002t.class
0 → 100644
View file @
4aceaad1
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment