Skip to content

the first list didn't renderproperly,could you give some help or hints #1

@sci-42ver

Description

@sci-42ver

when upgrade from ubuntu 20 to 22, I use new gdb and original gdb dashboard

czg:~$ gdb -v
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

change syntax according to doc with logging ... and the others kept same.

define hook-disassemble
echo \n
shell cat /tmp/colorPipe | c++filt | highlight --syntax=asm -s darkness -Oxterm256 &
set logging redirect on
set logging enabled on 
set logging file /tmp/colorPipe
end

define hookpost-disassemble
hookpost-list
end

define hook-list
echo \n
shell cat /tmp/colorPipe | c++filt | highlight --syntax=cpp -s darkness -Oxterm256 &
set logging redirect on
set logging enabled on 
set logging file /tmp/colorPipe
end

then in gdb run

>>> l                               
                                    
>>> l                               
                                                                         
                                                                         
48        double dx = (double)x;                                         
49        double dy = (double)y;                                         
50        double dz = (double)z;                                         
51                                  
52        printf("%x %x %x\n", x, y, z);                                                                                                          
53                                  
54        assert(A(x, dx));                                              
55        assert(!B(0, (double)(int)0, INT_MIN, (double)(int)INT_MIN));                                                                           
56        assert(C(dx, dy, dz));                                         
57        /* magic number, brute force attack */ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions