A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't use deprecated functions, and don't hide the corresponding warnings
[simgrid.git]
/
src
/
mc
/
DwarfExpression.cpp
diff --git
a/src/mc/DwarfExpression.cpp
b/src/mc/DwarfExpression.cpp
index
ecedcb2
..
6cdba68
100644
(file)
--- a/
src/mc/DwarfExpression.cpp
+++ b/
src/mc/DwarfExpression.cpp
@@
-4,13
+4,12
@@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cstddef>
#include <cstdint>
#include <cstdint>
-#include <cstdarg>
#include <dwarf.h>
#include <elfutils/libdw.h>
#include <dwarf.h>
#include <elfutils/libdw.h>
-#include "src/mc/mc_object_info.h"
#include "src/mc/mc_private.h"
#include "src/mc/LocationList.hpp"
#include "src/mc/AddressSpace.hpp"
#include "src/mc/mc_private.h"
#include "src/mc/LocationList.hpp"
#include "src/mc/AddressSpace.hpp"
@@
-70,17
+69,18
@@
void execute(
case DW_OP_breg29:
case DW_OP_breg30:
case DW_OP_breg31:{
case DW_OP_breg29:
case DW_OP_breg30:
case DW_OP_breg31:{
+ // Push register + constant:
int register_id = simgrid::dwarf::dwarf_register_to_libunwind(
op->atom - DW_OP_breg0);
unw_word_t res;
if (!context.cursor)
int register_id = simgrid::dwarf::dwarf_register_to_libunwind(
op->atom - DW_OP_breg0);
unw_word_t res;
if (!context.cursor)
- throw evaluation_error("Missin stack context");
+ throw evaluation_error("Missin
g
stack context");
unw_get_reg(context.cursor, register_id, &res);
stack.push(res + op->number);
break;
}
unw_get_reg(context.cursor, register_id, &res);
stack.push(res + op->number);
break;
}
- // Push the CFA (Canonical Frame Address
e
):
+ // Push the CFA (Canonical Frame Address):
case DW_OP_call_frame_cfa:
{
/* See 6.4 of DWARF4 (http://dwarfstd.org/doc/DWARF4.pdf#page=140):
case DW_OP_call_frame_cfa:
{
/* See 6.4 of DWARF4 (http://dwarfstd.org/doc/DWARF4.pdf#page=140):
@@
-117,7
+117,6
@@
void execute(
// ***** Constants:
// Short constant literals:
// ***** Constants:
// Short constant literals:
- // DW_OP_lit15 pushed the 15 on the stack.
case DW_OP_lit0:
case DW_OP_lit1:
case DW_OP_lit2:
case DW_OP_lit0:
case DW_OP_lit1:
case DW_OP_lit2:
@@
-150,6
+149,7
@@
void execute(
case DW_OP_lit29:
case DW_OP_lit30:
case DW_OP_lit31:
case DW_OP_lit29:
case DW_OP_lit30:
case DW_OP_lit31:
+ // Push a literal/constant on the stack:
stack.push(atom - DW_OP_lit0);
break;
stack.push(atom - DW_OP_lit0);
break;
@@
-191,9
+191,8
@@
void execute(
stack.pop();
break;
stack.pop();
break;
- // Swap the two top-most value of the stack:
case DW_OP_swap:
case DW_OP_swap:
- st
d::swap(stack.top(), stack.top(1)
);
+ st
ack.swap(
);
break;
// Duplicate the value under the top of the stack:
break;
// Duplicate the value under the top of the stack: