Open SpenserStyles opened 5 years ago
Thanks for the bug report, I've reproduced the bug on 7.2 & added the right shift on master. https://github.com/DGA-MI-SSI/YaCo/commit/9b85e6ca1809114c4df1382c11255f7e38408912 Please check if it fixes your issue. Note that IDA does not send any event when changing the segment base leading to potentially missing changes.
I'm attempting to use YaCo v2.6 with IDA 7.0 on a 8051 code base that uses banking for code pages. The segment base is corrupted when opening the _local IDB. This appears to be caused by incorrect use of the
ida_segment.get_segm_base()
andida_segment.set_segm_base()
.The following steps can be used to replicate the issue:
Create dummy binary file of size 0x20000
Load into IDA select Intel 8051 leave rest as defaults and click OK until at disassembly view
Open Program Segmentation and this is what you see:
Modify Program Segmentation to values below
Go to File->Script Command
Enter following code
now when using set_segm_base(seg) it screws it up the base
ida_segment.set_segm_base(seg, base)
get segment base linear address
seg = ida_segment.get_segm_by_name("B03") base = ida_segment.get_segm_base(seg) print(base) # this prints 65536 when should be 4096
now when using set_segm_base(seg) it screws it up the base for segment B03
ida_segment.set_segm_base(seg, base)