Recent Posts

Pages: 1 2 3 4 5 [6] 7 8 9 10
51
Help / Re: Making pretty printers for gdb
« Last post by visir on October 18, 2017, 09:38:08 pm »
I think I got it

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/debuggingprettyprinters.html

Code: [Select]
import gdb

class BufPrinter:
    def __init__(self, val):
        self.val = val

    def to_string(self):
        return self.val['list']['items'].string()


def lookup_type (val):
    print val.type
    if str(val.type) == 'Buf':
        print '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
        return BufPrinter(val)
    else:
        print '>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<'
    return None

gdb.pretty_printers.append(lookup_type)

Code: [Select]
python execfile("zig-gdb.py")
Code: [Select]
info pretty-printer
It reacted to str(val.type) == 'Buf', but the self.val['list']['items'].string() still doesn't work.
52
Help / Re: Go to word end instead begin of next word - Key bindings
« Last post by oBFusCATed on October 18, 2017, 09:10:49 pm »
So the current behaviour on linux is the correct one and the 16.01 on windows is broken?
Can you test the latest night build and tell us if this is ok on windows with it?
53
Help / Re: Project parser completes, nohing displayed in "symbols" window
« Last post by oBFusCATed on October 18, 2017, 09:09:31 pm »
I guess you're not using it on a linux with wx3.x. Otherwise you've seen many crashes already...
54
Using Code::Blocks / Re: HELP...nightly build configuration settings
« Last post by oBFusCATed on October 18, 2017, 09:04:53 pm »
why not? There are plenty on the wiki page and they are quite hard to import for the user. Why not ship them witch codeblocks?
Because the license for these is not clear. The wiki page has been delete once because the first contributor didn't like something (don't remember what now).
And more importantly they are not full. Someone has to go through all languages and make the theme work for them.
I see no one doing the work, so the themes are not included.

I have a plan to add support for importing notepad++, geany, codelite, eclipse and so on themes to cb_share_config, but this is very low priority at the moment.
If someone is willing to do the work, I'll be happy to review it...
55
Help / Re: Making pretty printers for gdb
« Last post by visir on October 18, 2017, 08:38:22 pm »
info auto-load python-scripts

Code: [Select]
Loaded  Script                                                                 
No      C:\Users\MyUser\Downloads\pig-gdb.py   

Not loaded, but it sees it...

show auto-load python-scripts

Code: [Select]
Auto-loading of Python scripts is on.
56
Using Code::Blocks / Re: HELP...nightly build configuration settings
« Last post by sodev on October 18, 2017, 08:30:04 pm »
Well, i made the following changes to get a nice dark scheme for CodeBlocks under CentOS with Mate and the BlackMATE system scheme:
Code: [Select]
Settings -> Environment -> Colours:
- Editor : Caret -> #FFFFFF
- Editor : Margin chrome colour -> #A6A6A6
- Editor : Margin chrome highlight colour -> #A6A6A6
- Logs : Success text -> #004CFF
- Logs : Warning text -> #004CFF
- Project Tree : Not-compiled files (headers/resources) -> #000000
- Start here page : Link colour -> #004CFF

Settings -> Editor -> Syntax highlighting
- New scheme based on default: invert
- Default:
  - Foreground: #FFFFFF
  - Background: #171717
- Keyword:
  - Foreground: #004CFF
- String:
  - Foreground: #00AAFF
- String (inactive):
  - Foreground: #BEEAFF
- UUID:
  - Foreground: #FFFFFF
- Selection:
  - Background: #666666
- Active line:
  - Background: #54ACFF

Settings -> Editor -> Margins and Caret
- Caret Width: 2
57
Help / Re: Making pretty printers for gdb
« Last post by visir on October 18, 2017, 08:14:25 pm »
Practically same

2.7.14 (default, Sep 18 2017, 09:17:44)  [GCC 7.2.0 64 bit (AMD64)]
58
Help / Re: Making pretty printers for gdb
« Last post by stahta01 on October 18, 2017, 07:48:26 pm »
What version of Python is supported by the gdb you are using?

Note: I have no idea what to do after you find out the version.

Code: [Select]
(gdb) python print sys.version
2.7.14 (default, Sep 18 2017, 09:26:14)  [GCC 7.2.0 32 bit]

Tim S.
59
Help / [solved, sort of]Making pretty printers for gdb
« Last post by visir on October 18, 2017, 06:39:56 pm »
I need to write a simple pretty printer for this:

Code: [Select]
Buf *in_file_buf

struct Buf {
    PigList<char> list;
}

template<typename T>
struct PigList {
    T *items;
    size_t length;
    size_t capacity;
}

I created a <executable-name>-gdb.py with this content

Code: [Select]
import gdb

class BufPrinter:
    def __init__(self, val):
        self.val = val

    def to_string(self):
        return self.val['list']['items'].string()

gdb.pretty_printers['^Buf *$'] = BufPrinter

Nothing changed.

Extra links:

https://sourceware.org/gdb/onlinedocs/gdb/Python-Auto_002dloading.html

http://wiki.codeblocks.org/index.php/Pretty_Printers

http://tromey.com/blog/?p=524
60
Help / Re: Project parser completes, nohing displayed in "symbols" window
« Last post by ravenspoint on October 18, 2017, 02:52:58 pm »
This is unhelpful. 

I have been using code::blocks for several years now on all my projects, small and large.  The time seems to have arrived for looking into alternatives.  I am seeing some good things about codelite.
Pages: 1 2 3 4 5 [6] 7 8 9 10