Message ID | cover.1728407374.git.aburgess@redhat.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DB4238650DE for <patchwork@sourceware.org>; Tue, 8 Oct 2024 17:12:28 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 0F3E43861039 for <gdb-patches@sourceware.org>; Tue, 8 Oct 2024 17:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F3E43861039 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F3E43861039 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728407517; cv=none; b=vg7XpOIOaWgnvjf4O9vRi2spTF2Irq3Fqp839cYLZCMwy0x7b866lBsWPvOsf7cHZ1aCL+K23RRJSrr8DwAsiR5UGgUK66hI1pAtUhfIwB9iM9judDri7iJz7B6Toi1tDKu5AgUm4pZRMtCN8eEiRPW3EVT4X7gY9tUWHXyt6EU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728407517; c=relaxed/simple; bh=XLGM4HcAGGDD1Buns+oY1yuJxlQp/KA+jXRjoK66gkU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=d0RR6j1hTkRfBRaVTRpojkoe4uXFnpvsrPqUShv6X+wZyfiFBqzVIaNFk1lLVJzzI9/tA/4txXe0wreNo7WdBmEOXtPUVm/NXlOc3McPZOKqotvuQXN1rbEaonx3CW/5sRkipO8sRTXn+W41N3xzvsOwcsrz4mS+RMnx/cREtVE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728407515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kkO4mrrW4sLR19Gt5O2lRtAR2KgZFtEdei9qAYvQPQs=; b=UK6b4DQ4nBahLcR1WI2EnYBp6BejdoO+lj5qBO+HB6zzagiIBHc2gKKpZaoBbkJwfgvVph zrDWAMVJqZivRfd1M1XOkO3y9TvZI7okYNctTymrjQJ1W974kFpbbYFyFsUaYhw2Hljrbu BS1784ltoEdYRWdmNa/1kXEYh7W4Jwo= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-48y53gjiNlmTaOdGq-ce2g-1; Tue, 08 Oct 2024 13:11:54 -0400 X-MC-Unique: 48y53gjiNlmTaOdGq-ce2g-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2faea3961a3so42647201fa.2 for <gdb-patches@sourceware.org>; Tue, 08 Oct 2024 10:11:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728407513; x=1729012313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kkO4mrrW4sLR19Gt5O2lRtAR2KgZFtEdei9qAYvQPQs=; b=kOPbtzXkZ9ecAC+hu+zI71CnoZyuZ+/24eteZJJe4k/RKIGGh9bV+oyqf3lDh40lu3 9JhzKxbdpQhkbfdZyvFKKdt6x6ud92dlgoN8Ov+yu+7FJrXoSfYogKsQFOekJbcg5wbE E2RxM8E7+W3V2YY+TuM9VWemB7HIOxx8pAeNcG0XOsPJDLvusbFY4K19Vf1AX0l3S58y Mhanbcyua6Q3SEj/hSCgNQtQ574z1bSzZLgOTYne0OKNZVcVR08E+zoPfuvXU/PzYAJV y1fWaTLI2/nQiXZfWnh20kcke33xwQZsPFgIfZgKBS4P93W3sPV3VVKV/XdNTfQXt6zr X3mA== X-Gm-Message-State: AOJu0YwS6/oJwLJuitqV/CjZOyMR5l5tp/9NkhCqyaC9gwB99nrgGhRZ zO1im2xkp6P/L2bauNLujjLh2sYJG2arlfiCCqIUisLEjsFNwEsC9pupVVHp/wW8FA2EatL7XG3 5dcHnyGFpEu7MiqR6vEbOKgDF5wLamumwZopd6MMAf/aZqUNIeCexxI75hhzyO/a9EUtXz8iX+b ZRRO1cBnMB8YSHI7PcU4LPntl0F3ynLu0ZnfBtCSq6ojQ= X-Received: by 2002:a2e:e11:0:b0:2f9:c337:aca9 with SMTP id 38308e7fff4ca-2faf3d8e286mr62715851fa.44.1728407512873; Tue, 08 Oct 2024 10:11:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdC46fD2/Zaa31L4qgdJ6YreJB3ZltOZvchKbYKfzsMWOg3Dc17lOjto7Z3LwAX3NjctfqxA== X-Received: by 2002:a2e:e11:0:b0:2f9:c337:aca9 with SMTP id 38308e7fff4ca-2faf3d8e286mr62715691fa.44.1728407512262; Tue, 08 Oct 2024 10:11:52 -0700 (PDT) Received: from localhost ([195.213.152.26]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c91c527a45sm31765a12.23.2024.10.08.10.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 10:11:51 -0700 (PDT) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com>, Luis Machado <luis.machado@arm.com> Subject: [PATCH 0/5] Set osabi in remote target descriptions Date: Tue, 8 Oct 2024 18:11:45 +0100 Message-Id: <cover.1728407374.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <cover.1728239729.git.aburgess@redhat.com> References: <cover.1728239729.git.aburgess@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Set osabi in remote target descriptions
|
|
Message
Andrew Burgess
Oct. 8, 2024, 5:11 p.m. UTC
I tried doing some remote debugging of a Window machine from a Linux machine and ran into some problems caused by gdbserver failing to set the osabi in the target description that is sent to GDB. This series fixes this issue. In v2: - Patches 3 & 4 are new. These are refactoring to allow for the updated patch 5. - Patch 5 is mostly the same, except the osabi is now set based on the enum values, rather than the osabi name strings. Thanks, Andrew --- Andrew Burgess (5): gdbserver: make arch and osabi names gdb::unique_xmalloc_ptr<char> gdb: make use of set_tdesc_osabi overload in features/ files gdb: split osabi support between gdb/ and gdbsupport/ directories gdb/gdbserver: change shared set_tdesc_osabi to take gdb_osabi gdbserver: pass osabi to GDB in target description gdb/arch/amd64.c | 3 +- gdb/arch/i386.c | 3 +- gdb/arch/tic6x.c | 3 +- gdb/features/mips-dsp-linux.c | 2 +- gdb/features/mips-linux.c | 2 +- gdb/features/or1k-linux.c | 2 +- gdb/features/sparc/sparc32-solaris.c | 2 +- gdb/features/sparc/sparc64-solaris.c | 2 +- gdb/osabi.c | 120 +++++++-------------------- gdb/osabi.h | 45 ++-------- gdb/target-descriptions.c | 11 +-- gdb/target-descriptions.h | 1 - gdbserver/linux-aarch32-tdesc.cc | 2 +- gdbserver/linux-aarch64-tdesc.cc | 3 +- gdbserver/linux-arc-low.cc | 2 +- gdbserver/linux-arm-tdesc.cc | 2 +- gdbserver/linux-csky-low.cc | 2 +- gdbserver/linux-loongarch-low.cc | 2 +- gdbserver/linux-riscv-low.cc | 2 +- gdbserver/linux-tic6x-low.cc | 2 +- gdbserver/linux-x86-tdesc.cc | 15 +++- gdbserver/netbsd-aarch64-low.cc | 2 +- gdbserver/netbsd-amd64-low.cc | 2 +- gdbserver/netbsd-i386-low.cc | 2 +- gdbserver/tdesc.cc | 24 +++--- gdbserver/tdesc.h | 11 ++- gdbserver/win32-i386-low.cc | 4 +- gdbserver/win32-low.h | 7 ++ gdbsupport/Makefile.am | 1 + gdbsupport/Makefile.in | 15 ++-- gdbsupport/osabi-common.cc | 98 ++++++++++++++++++++++ gdbsupport/osabi-common.def | 57 +++++++++++++ gdbsupport/osabi-common.h | 54 ++++++++++++ gdbsupport/tdesc.h | 4 +- 34 files changed, 319 insertions(+), 190 deletions(-) create mode 100644 gdbsupport/osabi-common.cc create mode 100644 gdbsupport/osabi-common.def create mode 100644 gdbsupport/osabi-common.h base-commit: bcb92f7ba7b22ac882c000cabfd7ca8bea47c184
Comments
On 2024-10-08 13:11, Andrew Burgess wrote: > I tried doing some remote debugging of a Window machine from a Linux > machine and ran into some problems caused by gdbserver failing to set > the osabi in the target description that is sent to GDB. This series > fixes this issue. > > In v2: > > - Patches 3 & 4 are new. These are refactoring to allow for the > updated patch 5. > > - Patch 5 is mostly the same, except the osabi is now set based on > the enum values, rather than the osabi name strings. > > Thanks, > Andrew I'm done sending comments, nothing is a blocker, so feel free to address them or not, then: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
Simon Marchi <simark@simark.ca> writes: > On 2024-10-08 13:11, Andrew Burgess wrote: >> I tried doing some remote debugging of a Window machine from a Linux >> machine and ran into some problems caused by gdbserver failing to set >> the osabi in the target description that is sent to GDB. This series >> fixes this issue. >> >> In v2: >> >> - Patches 3 & 4 are new. These are refactoring to allow for the >> updated patch 5. >> >> - Patch 5 is mostly the same, except the osabi is now set based on >> the enum values, rather than the osabi name strings. >> >> Thanks, >> Andrew > > I'm done sending comments, nothing is a blocker, so feel free to address > them or not, then: > > Approved-By: Simon Marchi <simon.marchi@efficios.com> I've addressed all the minor issues you raised and pushed this series. I've not addressed the osabi being set to GNU/Linux in amd64_create_target_description, which I agree is a little weird. I still have an item on my todo list to refactor the x86 target description creation code, so I've added a note to look at this when I get to that task (if it's not been addressed earlier), though it'll be towards the end of this quarter, or Q1 2025 before I'll have time to look at the target description stuff again I think. Thanks, Andrew