From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DE1B13858283 for ; Thu, 16 Nov 2023 17:21:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE1B13858283 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 DE1B13858283 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=1700155302; cv=none; b=ZInJWwcWoGjLXfXW1Y76t1G6kR9VNjxa6d71J2aL+S5S82vT0z1Ul1byaJj3oG+5tZauA1+cxFTb2WSn93ewFbJCJGEF0P04C48S5GOzx1k4+0dXi1wsom66hA1sjOzdsRefmuMAZKq+/WMTyq7snBjpLvKht4KmyCFIwqwid7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700155302; c=relaxed/simple; bh=uuMmR4qfexdi00LLdxyjNgHcRg/FJzZvlThrQBVv4Rw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cgcTfUmFeE3kPK0s07Uzfni6x3uoXQ4G4mdROWg5jyHDv+YAgw4BBlI8qtxc3jX/v2mkr76PHjuytcQTKFhw7hQNIepjzpegIqBAq9ycF5rt0kFMPTOejfDmNy6obNID0841hKv1WKo4aox8NqZzQFy5p4cKIqicwekzjkFZz60= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700155300; 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: in-reply-to:in-reply-to:references:references; bh=yXwihr5xZn8xPg6W5/jJWTkmi7JPus6jFq9LDs3VLRg=; b=ccTQTANfnk3/5/mMgr0sI+5Hw9IjkJMnLFlnDlrF31+pgBi4K2ePdh3tBLSRJ50Ec4m4gK qf/W7syxh/7lfmkf3h5NjNqQDDVxXYeRNSu8qyNODLpI27bW7dwlaoBgAcTCi4A2BTkj3e 0e7cBffGh6lhmseJ9jGk7AT7Kctud2c= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-h-Z92NvQMuK9uBqnEPEQOQ-1; Thu, 16 Nov 2023 12:21:39 -0500 X-MC-Unique: h-Z92NvQMuK9uBqnEPEQOQ-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5090b916b7fso1466161e87.1 for ; Thu, 16 Nov 2023 09:21:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700155297; x=1700760097; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yXwihr5xZn8xPg6W5/jJWTkmi7JPus6jFq9LDs3VLRg=; b=h8AJnFucoWGRY9bwO+jzla0BQZRDQSqXG7ZaCroeIjD5jFQW6UXum/JYPlxd/M0gqU /wVtI0P2pG5wQ8hwJq4H5YNqHal2XrHpkzQkVxw9Hb886+mfk8O72irl8Nj420XADw1n WrjeSfIQdjobmEgawU//w9mJObhrQqQpRengzKV6gg5tOCa8N0kgcMMWiZGZmtcr6sY3 /60bl9X7EZ1e1cFPD+mim9hYdSgkOC4Y9/kBFI5aEKiAoIRz7NeMlFuAqvQ6S9QmhYXt 2yD/2xu6wUAyO8rpcaSiGMejCGaI/APaozvUEwOAxET+M3ckNCv9H/8IS4oYOwHBaoTK M9Fw== X-Gm-Message-State: AOJu0YzZcwVJCtQ+ubmhbFlsKxvtNNvS7hVUiSSDdifdStnpYeIWg/1T 3UsLdNStBidAJYHlT+3j3hhqShBwH9nPX9hzQn1cJxrns13MpQtHzICyhpbNlSpTCsKkqPgAeJK Q9eV7RXZWnJtsKQnHiICV3A== X-Received: by 2002:a05:6512:38b0:b0:507:a04c:76e8 with SMTP id o16-20020a05651238b000b00507a04c76e8mr9456816lft.46.1700155297615; Thu, 16 Nov 2023 09:21:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFli6f1o+Om4Y+0F2uUGisziFaVwx1wf0cbaZIMGWBX1CIxIDDv8FP5ALytgDOdqps0W4ilxA== X-Received: by 2002:a05:6512:38b0:b0:507:a04c:76e8 with SMTP id o16-20020a05651238b000b00507a04c76e8mr9456804lft.46.1700155297290; Thu, 16 Nov 2023 09:21:37 -0800 (PST) Received: from localhost (105.226.159.143.dyn.plus.net. [143.159.226.105]) by smtp.gmail.com with ESMTPSA id m3-20020adffe43000000b0032d8354fb43sm14197837wrs.76.2023.11.16.09.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 09:21:36 -0800 (PST) From: Andrew Burgess To: Tom de Vries , gdb-patches@sourceware.org Cc: Tom Tromey , Eli Zaretskii Subject: Re: [PATCHv2 5/5] gdb: implement missing debug handler hook for Python In-Reply-To: <14b96a7f-0250-4224-ab76-758910112629@suse.de> References: <87a5req805.fsf@redhat.com> <14b96a7f-0250-4224-ab76-758910112629@suse.de> Date: Thu, 16 Nov 2023 17:21:36 +0000 Message-ID: <871qcpr4v3.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tom de Vries writes: > On 11/16/23 11:59, Andrew Burgess wrote: >> Tom de Vries writes: >> >>> On 11/8/23 16:48, Andrew Burgess wrote: >>>> + for ch in name: + if not ch.isascii() or not (ch.isalnum() or ch in >>>> "_-"): + raise ValueError("invalid character '%s' in handler name: %s" % >>>> (ch, name)) + + >>> >>> on openSUSE leap 15.4 with python 3.6 I run into: >>> ... >>> (gdb) PASS: gdb.python/py-missing-debug.exp: initial checks: debug info >>> no longer found >>> source >>> /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.python/py-missing-debug/py-missing-debug.py^M >>> Traceback (most recent call last):^M >>> File >>> "/data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.python/py-missing-debug/py-missing-debug.py", >>> line 117, in ^M >>> rhandler = exception_handler()^M >>> File >>> "/data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.python/py-missing-debug/py-missing-debug.py", >>> line 93, in __init__^M >>> super().__init__("exception_handler")^M >>> File >>> "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/missing_debug.py", >>> line 70, in __init__^M >>> _validate_name(name)^M >>> File >>> "/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/missing_debug.py", >>> line 41, in _validate_name^M >>> if not ch.isascii() or not (ch.isalnum() or ch in "_-"):^M >>> AttributeError: 'str' object has no attribute 'isascii'^M >>> (gdb) FAIL: gdb.python/py-missing-debug.exp: source python script >> >> Sorry about this Tom. Turns out str.isascii() (and friends) were only >> added in 3.7. >> > > Np, thanks for fixing this. > >> I believe the patch below should fix things. Local testing here with >> 3.6 suggests it is fine. I'll push this tomorrow if I don't get any >> feedback before then. > > With this patch the test-case passes cleanly for me: > ... > Running > /data/vries/gdb/src/gdb/testsuite/gdb.python/py-missing-debug.exp ... > > === gdb Summary === > > # of expected passes 83 > ... > so, LGTM. I've gone ahead and pushed this. Thanks, Andrew