From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v2 08/12] xenctx: Add -d option to dump memory at daddr as a stack. Date: Thu, 7 Nov 2013 19:21:24 -0500 Message-ID: <527C2E84.9020403@terremark.com> References: <1383768500-4245-1-git-send-email-dslutz@terremark.com> <1383768500-4245-9-git-send-email-dslutz@terremark.com> <527B5BD602000078001007A9@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VeZrp-0004qN-J5 for xen-devel@lists.xenproject.org; Fri, 08 Nov 2013 00:24:05 +0000 In-Reply-To: <527B5BD602000078001007A9@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Don Slutz Cc: Ian Campbell , Stefano Stabellini , George Dunlap , Don Slutz , Ian Jackson , xen-devel List-Id: xen-devel@lists.xenproject.org On 11/07/13 03:22, Jan Beulich wrote: >>>> On 06.11.13 at 21:08, Don Slutz wrote: >> @@ -956,9 +973,9 @@ int main(int argc, char **argv) >> } >> >> if (xenctx.all_vcpus) >> - dump_all_vcpus(); >> + dump_all_vcpus(stk_addr); >> else >> - dump_ctx(vcpu); >> + dump_ctx(vcpu, stk_addr); > For one, it hardly makes much sense to dump all vCPU-s with a > single stack address. And assuming a stack can't sit at address > zero is wrong too - you shouldn't make any assumptions in > particular for HVM guests. > > So what you intend here should lead to just the requested > "stack" to be printed, without touching other functionality (i.e. > likely you'll want the "if()" above preceded by another one, and > itself converted to an "else if()"). > > Jan > It is clear that handling "-d" out side of dump_ctx() make sense. Not so sure on the simple else. I think that -C should still dump all cpus even if -d is provided. I guess I could complain if both -d and -C are specified, but I like to just do the requested actions. -Don Slutz