stacksize: add support for DW_CFA_offset_extended
It should be possible to ignore this directive, but we still have to consume the two operands.
Этот коммит содержится в:
родитель
6ec868710b
коммит
a4d0877cf0
1 изменённых файлов: 13 добавлений и 0 удалений
|
@ -190,6 +190,8 @@ func (fi *frameInfo) exec(bytecode []byte) ([]frameInfoLine, error) {
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// For details on the various opcodes, see:
|
||||||
|
// http://dwarfstd.org/doc/DWARF5.pdf (page 239)
|
||||||
highBits := op >> 6 // high order 2 bits
|
highBits := op >> 6 // high order 2 bits
|
||||||
lowBits := op & 0x1f
|
lowBits := op & 0x1f
|
||||||
switch highBits {
|
switch highBits {
|
||||||
|
@ -217,6 +219,17 @@ func (fi *frameInfo) exec(bytecode []byte) ([]frameInfoLine, error) {
|
||||||
fi.loc += uint64(offset) * fi.cie.codeAlignmentFactor
|
fi.loc += uint64(offset) * fi.cie.codeAlignmentFactor
|
||||||
entries = append(entries, fi.newLine())
|
entries = append(entries, fi.newLine())
|
||||||
// TODO: DW_CFA_advance_loc2 etc
|
// TODO: DW_CFA_advance_loc2 etc
|
||||||
|
case 0x05: // DW_CFA_offset_extended
|
||||||
|
// Semantics are the same as DW_CFA_offset, but the encoding is
|
||||||
|
// different. Ignore it just like DW_CFA_offset.
|
||||||
|
_, err := readULEB128(r) // ULEB128 register
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
_, err = readULEB128(r) // ULEB128 offset
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
case 0x07: // DW_CFA_undefined
|
case 0x07: // DW_CFA_undefined
|
||||||
// Marks a single register as undefined. This is used to stop
|
// Marks a single register as undefined. This is used to stop
|
||||||
// unwinding in tinygo_startTask using:
|
// unwinding in tinygo_startTask using:
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче