Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>,
	Simon Marchi <simon.marchi@efficios.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: use XML_GetCurrentLineNumber64 with expat >= 2.9.0
Date: Tue, 13 Oct 2026 10:54:40 -0400	[thread overview]
Message-ID: <84eceeb6-2e20-4246-9584-2c7c8c2b0b09@simark.ca> (raw)
In-Reply-To: <89c300fa-77b0-4524-b3ee-11d58af2125c@suse.de>

On 10/13/26 5:23 AM, Tom de Vries wrote:
> On 10/11/26 3:31 PM, Simon Marchi wrote:
>> When building against expat 2.9.0, I get:
>>
>>        CXX    xml-support.o
>>      /home/smarchi/src/binutils-gdb/gdb/xml-support.c:182:39: error: 'XML_Size XML_GetCurrentLineNumber(XML_Parser)' is deprecated: please use XML_GetCurrentLineNumber64 instead [-Werror=deprecated-declarations]
>>        182 |   int line = XML_GetCurrentLineNumber (m_expat_parser);
>>            |              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
>>
>> The functions that return XML_Size were deprecated in favor of the new
>> functions, with suffix 64, that return uint64_t.
>>
>> Add a gdb_xml_get_current_line_number wrapper in gdb_expat.h, which
>> calls XML_GetCurrentLineNumber64 with expat 2.9.0 and later, and
>> XML_GetCurrentLineNumber otherwise.  Use it in xml-support.c.
>>
>> The uint64_t gets truncated when converted to int, but that was already
>> true before, as XML_Size is 64-bits when building on an arch where
>> unsigned long is 64-bits.
>>
> 
> Hi Simon.
> 
> I ran into the same issue on Tumbleweed.
> 
> I applied this series, and I managed to complete the build.
> 
> Both patches LGTM.
> 
> Reviewed-By: Tom de Vries <tdevries@suse.de>

Thanks, pushed both.

Simon

      reply	other threads:[~2026-10-13 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 13:31 Simon Marchi
2026-10-11 13:31 ` [PATCH 2/2] gdb: remove workarounds for old expat versions Simon Marchi
2026-10-13  9:23 ` [PATCH 1/2] gdb: use XML_GetCurrentLineNumber64 with expat >= 2.9.0 Tom de Vries
2026-10-13 14:54   ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84eceeb6-2e20-4246-9584-2c7c8c2b0b09@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox