@@ -297,7 +297,7 @@ RZ_IPI bool rz_core_debug_reg_list(RzCore *core, int type, int size, PJ *pj, int
297
297
return false;
298
298
}
299
299
if (rad == 1 || rad == '*' ) {
300
- dbg -> cb_printf ("fs+%s\n" , RZ_FLAGS_FS_REGISTERS );
300
+ rz_cons_printf ("fs+%s\n" , RZ_FLAGS_FS_REGISTERS );
301
301
}
302
302
rz_list_foreach (head , iter , item ) {
303
303
ut64 value ;
@@ -442,7 +442,7 @@ RZ_IPI bool rz_core_debug_reg_list(RzCore *core, int type, int size, PJ *pj, int
442
442
n ++ ;
443
443
}
444
444
if (rad == 1 || rad == '*' ) {
445
- dbg -> cb_printf ("fs-\n" );
445
+ rz_cons_printf ("fs-\n" );
446
446
}
447
447
beach :
448
448
if (isJson ) {
@@ -656,11 +656,6 @@ static void print_debug_map_json(RzDebugMap *map, PJ *pj) {
656
656
pj_end (pj );
657
657
}
658
658
659
- /* Write the memory map header describing the line columns */
660
- static void print_debug_map_line_header (RzDebug * dbg ) {
661
- // TODO: Write header to console based on which command is being ran
662
- }
663
-
664
659
/* Write a single memory map line to the console */
665
660
static void print_debug_map_line (RzDebug * dbg , RzDebugMap * map , ut64 addr , RzOutputMode mode ) {
666
661
char humansz [8 ];
@@ -670,7 +665,7 @@ static void print_debug_map_line(RzDebug *dbg, RzDebugMap *map, ut64 addr, RzOut
670
665
: rz_str_newf ("%08" PFMT64x ".%s" , map -> addr , rz_str_rwx_i (map -> perm ));
671
666
rz_name_filter (name , 0 , true);
672
667
rz_num_units (humansz , sizeof (humansz ), map -> addr_end - map -> addr );
673
- dbg -> cb_printf ("0x%016" PFMT64x " - 0x%016" PFMT64x " %6s %5s %s\n" ,
668
+ rz_cons_printf ("0x%016" PFMT64x " - 0x%016" PFMT64x " %6s %5s %s\n" ,
674
669
map -> addr ,
675
670
map -> addr_end ,
676
671
humansz ,
@@ -697,7 +692,7 @@ static void print_debug_map_line(RzDebug *dbg, RzDebugMap *map, ut64 addr, RzOut
697
692
free (filtered_name );
698
693
}
699
694
rz_num_units (humansz , sizeof (humansz ), map -> size );
700
- dbg -> cb_printf (fmtstr ,
695
+ rz_cons_printf (fmtstr ,
701
696
map -> addr ,
702
697
map -> addr_end ,
703
698
(addr >= map -> addr && addr < map -> addr_end ) ? '*' : '-' ,
@@ -727,8 +722,6 @@ RZ_API void rz_debug_map_print(RzDebug *dbg, ut64 addr, RzOutputMode mode) {
727
722
return ;
728
723
}
729
724
pj_a (pj );
730
- } else if (mode == RZ_OUTPUT_MODE_STANDARD ) {
731
- print_debug_map_line_header (dbg );
732
725
}
733
726
734
727
for (i = 0 ; i < 2 ; i ++ ) { // Iterate over dbg::maps and dbg::maps_user
@@ -744,7 +737,7 @@ RZ_API void rz_debug_map_print(RzDebug *dbg, ut64 addr, RzOutputMode mode) {
744
737
? rz_str_newf ("%s.%s" , map -> name , rz_str_rwx_i (map -> perm ))
745
738
: rz_str_newf ("%08" PFMT64x ".%s" , map -> addr , rz_str_rwx_i (map -> perm ));
746
739
rz_name_filter (name , 0 , true);
747
- dbg -> cb_printf ("f map.%s 0x%08" PFMT64x " 0x%08" PFMT64x "\n" ,
740
+ rz_cons_printf ("f map.%s 0x%08" PFMT64x " 0x%08" PFMT64x "\n" ,
748
741
name , map -> addr_end - map -> addr + 1 , map -> addr );
749
742
free (name );
750
743
} break ;
@@ -765,7 +758,7 @@ RZ_API void rz_debug_map_print(RzDebug *dbg, ut64 addr, RzOutputMode mode) {
765
758
766
759
if (pj ) { // "dmj" add JSON closing array brace
767
760
pj_end (pj );
768
- dbg -> cb_printf ("%s\n" , pj_string (pj ));
761
+ rz_cons_printf ("%s\n" , pj_string (pj ));
769
762
pj_free (pj );
770
763
}
771
764
}
@@ -852,7 +845,7 @@ static void print_debug_maps_ascii_art(RzDebug *dbg, RzList *maps, ut64 addr, in
852
845
fmtstr = dbg -> bits & RZ_SYS_BITS_64 // Prefix formatting string (before bar)
853
846
? "map %4.8s %c %s0x%016" PFMT64x "%s |"
854
847
: "map %4.8s %c %s0x%08" PFMT64x "%s |" ;
855
- dbg -> cb_printf (fmtstr , humansz ,
848
+ rz_cons_printf (fmtstr , humansz ,
856
849
(addr >= map -> addr &&
857
850
addr < map -> addr_end )
858
851
? '*'
@@ -863,15 +856,15 @@ static void print_debug_maps_ascii_art(RzDebug *dbg, RzList *maps, ut64 addr, in
863
856
ut64 pos = min + (col * mul ); // Current address space to check
864
857
ut64 npos = min + ((col + 1 ) * mul ); // Next address space to check
865
858
if (map -> addr < npos && map -> addr_end > pos ) {
866
- dbg -> cb_printf ("#" ); // TODO: Comment what a # represents
859
+ rz_cons_printf ("#" ); // TODO: Comment what a # represents
867
860
} else {
868
- dbg -> cb_printf ("-" );
861
+ rz_cons_printf ("-" );
869
862
}
870
863
}
871
864
fmtstr = dbg -> bits & RZ_SYS_BITS_64 ? // Suffix formatting string (after bar)
872
865
"| %s0x%016" PFMT64x "%s %s %s\n"
873
866
: "| %s0x%08" PFMT64x "%s %s %s\n" ;
874
- dbg -> cb_printf (fmtstr , color_prefix , map -> addr_end , color_suffix ,
867
+ rz_cons_printf (fmtstr , color_prefix , map -> addr_end , color_suffix ,
875
868
rz_str_rwx_i (map -> perm ), map -> name );
876
869
last = map -> addr ;
877
870
}
0 commit comments