1
0
Fork 0

DBG+GUI: AStyle

This commit is contained in:
Duncan Ogilvie 2018-11-18 15:50:13 +01:00
parent 418541e46e
commit 688e2ccc04
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
3 changed files with 11 additions and 10 deletions

View File

@ -388,11 +388,11 @@ void ReadDebugDirectory(MODINFO & Info, ULONG_PTR FileMapVA)
IMAGE_DIRECTORY_ENTRY_DEBUG,
&debugDirSize);
if(debugDirSize == 0 || debugDir == nullptr ||
// Check if debugDir fits into the mapped area
(ULONG_PTR)debugDir + debugDirSize > FileMapVA + Info.loadedSize ||
// Check for ULONG_PTR wraparound (e.g. when debugDirSize == 0xfffff000)
(ULONG_PTR)debugDir + debugDirSize < (ULONG_PTR)debugDir)
(ULONG_PTR)debugDir + debugDirSize > FileMapVA + Info.loadedSize || /* Check if debugDir fits into the mapped area */
(ULONG_PTR)debugDir + debugDirSize < (ULONG_PTR)debugDir) /* Check for ULONG_PTR wraparound (e.g. when debugDirSize == 0xfffff000) */
{
return;
}
struct CV_HEADER
{

View File

@ -559,7 +559,7 @@ void DisassemblerGraphView::paintZoom(QPainter & p, QRect & viewportRect, int xo
auto dbgfunctions = DbgFunctions();
QPoint translation(this->renderXOfs - xofs, this->renderYOfs - yofs);
p.translate(translation);\
p.translate(translation);
p.scale(zoomLevel, zoomLevel);
//Adjust imaginary viewport rect at new zoom level
@ -848,22 +848,23 @@ void DisassemblerGraphView::wheelEvent(QWheelEvent* event)
if(!DbgIsDebugging())
return;
if (event->modifiers() & Qt::ControlModifier && graphZoomMode) {
if(event->modifiers() & Qt::ControlModifier && graphZoomMode)
{
QPoint numDegrees = event->angleDelta() / 8;
QPoint numSteps = numDegrees / 15;
QPoint mousePosition = event->pos();
zoomBoost = 1;
//Speed up zooming on large graphs by Ctrl+Shift
if (event->modifiers() & Qt::ShiftModifier)
if(event->modifiers() & Qt::ShiftModifier)
zoomBoost = 2;
if (numSteps.y() > 0)
if(numSteps.y() > 0)
{
zoomDirection = 1;
zoomIn(mousePosition);
}
else if (numSteps.y() < 0)
else if(numSteps.y() < 0)
{
zoomDirection = -1;
zoomOut(mousePosition);

View File

@ -93,7 +93,7 @@ private slots:
void on_editSymbolCache_textEdited(const QString & arg1);
void on_chkUtf16LogRedirect_toggled(bool checked);
void on_chkShowGraphRva_toggled(bool checked);
void on_chkGraphZoomMode_toggled(bool checked);
void on_chkGraphZoomMode_toggled(bool checked);
void on_chkUseLocalHelpFile_toggled(bool checked);
void on_chkQueryProcessCookie_toggled(bool checked);
void on_chkQueryWorkingSet_toggled(bool checked);