@@ -564,7 +564,8 @@ pub fn instruction_hover(
564
564
if let Some ( reloc) = resolved. relocation {
565
565
out. push ( HoverItem :: Separator ) ;
566
566
out. append ( & mut relocation_hover ( obj, reloc, None ) ) ;
567
- if let Some ( ty) = obj. arch . guess_data_type ( resolved) {
567
+ let bytes = obj. symbol_data ( reloc. relocation . target_symbol ) . unwrap_or ( & [ ] ) ;
568
+ if let Some ( ty) = obj. arch . guess_data_type ( resolved, bytes) {
568
569
let literals = display_ins_data_literals ( obj, resolved) ;
569
570
if !literals. is_empty ( ) {
570
571
out. push ( HoverItem :: Separator ) ;
@@ -758,7 +759,7 @@ pub fn display_ins_data_labels(obj: &Object, resolved: ResolvedInstructionRef) -
758
759
} ;
759
760
let bytes = & data[ reloc. relocation . addend as usize ..] ;
760
761
obj. arch
761
- . guess_data_type ( resolved)
762
+ . guess_data_type ( resolved, bytes )
762
763
. map ( |ty| ty. display_labels ( obj. endianness , bytes) )
763
764
. unwrap_or_default ( )
764
765
}
@@ -775,7 +776,7 @@ pub fn display_ins_data_literals(obj: &Object, resolved: ResolvedInstructionRef)
775
776
} ;
776
777
let bytes = & data[ reloc. relocation . addend as usize ..] ;
777
778
obj. arch
778
- . guess_data_type ( resolved)
779
+ . guess_data_type ( resolved, bytes )
779
780
. map ( |ty| ty. display_literals ( obj. endianness , bytes) )
780
781
. unwrap_or_default ( )
781
782
}
0 commit comments