From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19124 invoked by alias); 29 Sep 2011 12:47:20 -0000 Received: (qmail 19113 invoked by uid 22791); 29 Sep 2011 12:47:19 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yw0-f41.google.com (HELO mail-yw0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Sep 2011 12:46:59 +0000 Received: by ywe9 with SMTP id 9so599112ywe.0 for ; Thu, 29 Sep 2011 05:46:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.178.41 with SMTP id e29mr27112787yhm.117.1317300418606; Thu, 29 Sep 2011 05:46:58 -0700 (PDT) Received: by 10.236.203.135 with HTTP; Thu, 29 Sep 2011 05:46:58 -0700 (PDT) In-Reply-To: <4E845D53.9090102@gmail.com> References: <4E845D53.9090102@gmail.com> Date: Thu, 29 Sep 2011 12:47:00 -0000 Message-ID: Subject: Re: Extending GDB to provide console over telnet From: Matt Rice To: Grigory Tolstolytkin Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00131.txt.bz2 On Thu, Sep 29, 2011 at 4:58 AM, Grigory Tolstolytkin wrote: > Hi, > > I'm working on extending gdb functionality and would like to start a > discussion since it might be useful for other people too. you can kind of do this purely with python, below is a link to a python script which (it only writes to the network, doesn't read..) I use it to dump the current source location to some port every time gdb stops (probably using some patches)... adding this sort of stuff to .gdbinit python from misc_gdb import twisted_gdb # listen on port on 8007. python twisted_gdb.start(8007) define hook-stop python twisted_gdb.dumpCurrentLocation() end in theory it'd be simple to read data from the client and gdb.execute() them, though I believe that anything which queries the user with a yes/no style confirmation, is going to end up with the default. https://gitorious.org/misc-gdb-stuff/misc-gdb-stuff/blobs/master/misc_gdb/twisted_gdb.py