From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16792 invoked by alias); 17 Dec 2010 16:10:38 -0000 Received: (qmail 16777 invoked by uid 22791); 17 Dec 2010 16:10:36 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from ms9.webland.ch (HELO ms9smtp.webland.ch) (92.43.217.109) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Dec 2010 16:10:30 +0000 Received: from macserver.private ([84.74.43.109]) by ms9smtp.webland.ch (Webland Mail Server v10.0) with ASMTP id ZCB78326 for ; Fri, 17 Dec 2010 17:10:26 +0100 Received: from localhost (localhost [127.0.0.1]) by macserver.private (Postfix) with ESMTP id D92A1A65433; Fri, 17 Dec 2010 17:10:24 +0100 (CET) Received: from macserver.private ([127.0.0.1]) by localhost (macserver.private [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qy5pUZ65Q2rk; Fri, 17 Dec 2010 17:10:24 +0100 (CET) Received: from [192.168.1.86] (unknown [192.168.1.86]) by macserver.private (Postfix) with ESMTP id 93C00A65428 for ; Fri, 17 Dec 2010 17:10:24 +0100 (CET) Message-ID: <4D0B8B6F.8010107@indel.ch> Date: Fri, 17 Dec 2010 16:10:00 -0000 From: Raphael Zulliger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Remote protocol: undocumented return value for 'p' Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-12/txt/msg00049.txt.bz2 Hi During the development of a GDB stub, I encountered a "hidden feature": the 'p n' command (reading the value of a register) accepts an undocumented return value, which is not mentioned in the official GDB documentation: 'x'. the source code looks like this: /* If this register is unfetchable, tell the regcache. */ if (buf[0] == 'x') { regcache_raw_supply (regcache, reg->regnum, NULL); return 1; } At some point during the development of my stub it was important for me to have this 'hidden feature'. Unfortunately, I can't remember why it was important - and now it seems that I don't rely on that anymore... However, at that time, it would have helped me to save some time if I could just read it from the PDF instead of searching it in the code. The final question is: Is this feature missing in the documentation by 'intention' or by 'mistake'? If it's the latter case, I would suggest adding it. Let me know if I should create an according patch. Raphael