[Crash-utility] [PATCH v1 01/10] Add LoongArch64 framework code support
lijiang
lijiang at redhat.com
Thu Oct 26 05:53:26 UTC 2023
On Mon, Oct 23, 2023 at 3:33 PM Ming Wang <wangming01 at loongson.cn> wrote:
> Hi, Lianbo
>
> On 10/8/23 20:00, lijiang wrote:
> > Hi, Ming
> > So sorry for the late reply.
> > On Thu, Sep 7, 2023 at 9:56 AM <crash-utility-request at redhat.com> wrote:
> >
> > Date: Thu, 7 Sep 2023 09:46:42 +0800
> > From: Ming Wang <wangming01 at loongson.cn>
> > To: crash-utility at redhat.com
> > Cc: yangtiezhu at loongson.cn, lixuefeng at loongson.cn,
> > chenhuacai at kernel.org
> > Subject: [Crash-utility] [PATCH v1 01/10] Add LoongArch64 framework
> > code support
> > Message-ID: <20230907014651.167784-2-wangming01 at loongson.cn>
> > Content-Type: text/plain; charset=UTF-8
> >
> >
> > The gdb patches have their own format(style), for more details, please
> refer to the current gdb-10.2.patch.
> >
> I tested the diff /git diff and git format-patch methods to generate
> patches. The patch format generated by these methods seems to be different
> from gdb-10.2.patch.
>
> I also read the man manuals of these methods and found no relevant
> parameters.
>
> If I want to update gdb-10.2.patch, what command sequence should I use to
> generate a patch file in the following format:
>
>
> --- gdb-10.2/Makefile.in.orig
> +++ gdb-10.2/Makefile.in
> @@ -340,6 +340,9 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
> AS_FOR_BUILD = @AS_FOR_BUILD@
> CC_FOR_BUILD = @CC_FOR_BUILD@
> CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
> +ifeq (${CRASH_TARGET}, PPC64)
> +CFLAGS_FOR_BUILD += -m64 -fPIC
> +endif
>
>
> What confuses me is how the .orig in the patch is generated.
>
> If I integrate loongarch's gdb modifications into the gdb-10.2.patch file,
> what method is recommended?
>
>
>
Usually, I use the "git diff" to generate a new patch based on the already
patched gdb source code, and then copy the result of diff at the end of
gdb-10.2.patch, also need to modify it manually a bit, just like you have
seen there. For example:
+--- gdb-10.2/gdb/ada-lang.c.orig --- only these two lines need to be
modified manually(and *DO NOT* make any manual edits to the patch content)
++++ gdb-10.2/gdb/ada-lang.c
+@@ -1158,7 +1158,7 @@ ada_decode (const char *encoded)
+ i -= 1;
+ if (i > 1 && encoded[i] == '_' && encoded[i - 1] == '_')
+ len0 = i - 1;
+- else if (encoded[i] == '$')
++ else if (i >= 0 && encoded[i] == '$')
+ len0 = i;
+ }
Hope this helps.
Thanks
Lianbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20231026/041e4397/attachment.htm>
More information about the Crash-utility
mailing list