diff options
| author | Florent Monjalet <florent.monjalet@gmail.com> | 2015-06-21 23:20:41 +0200 |
|---|---|---|
| committer | Florent Monjalet <florent.monjalet@gmail.com> | 2015-06-21 23:28:38 +0200 |
| commit | 8bca2287aa0ae827c00388a0463542eb6c072c9e (patch) | |
| tree | b3ef88e5cbd808ad83ecedf452498e011d075966 /miasm2/core/cpu.py | |
| parent | b833f9a1321fb4b5f0e69cecdedf7694f9682da8 (diff) | |
| download | miasm-8bca2287aa0ae827c00388a0463542eb6c072c9e.tar.gz miasm-8bca2287aa0ae827c00388a0463542eb6c072c9e.zip | |
cpu: raising an exception when label offset is None
This seems more helpful than setting the offset to 0 by default.
Diffstat (limited to 'miasm2/core/cpu.py')
| -rw-r--r-- | miasm2/core/cpu.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index efb511ce..c42de507 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -958,9 +958,8 @@ class instruction(object): if not name in symbols: continue if symbols[name].offset is None: - default_size = self.get_symbol_size(x, symbols) - # default value - value = m2_expr.ExprInt_fromsize(default_size, 0) + raise ValueError('The offset of label "%s" cannot be ' + 'determined' % name) else: size = x.size if size is None: |