* PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE @ 2010-04-09 15:50 H.J. Lu 2010-04-09 16:00 ` Mark Kettenis 2010-04-09 16:02 ` Joel Brobecker 0 siblings, 2 replies; 12+ messages in thread From: H.J. Lu @ 2010-04-09 15:50 UTC (permalink / raw) To: GDB Hi, This patch fixes gcore by not generating core regset sections which aren't supported by i386 without SSE. OK to install? Thanks. H.J. --- 2010-04-09 H.J. Lu <hongjiu.lu@intel.com> PR corefiles/11481 * i386-linux-nat.c (i386_linux_read_description): Call i386_linux_update_regset_section to set sizes of .reg-xfp/.reg-xstate core regset sections to 0. * i386-linux-tdep.c (i386_linux_update_regset_section): New. * i386-linux-tdep.h (i386_linux_update_regset_section): New. * linux-nat.c (linux_nat_do_thread_registers): Skip empty sections. diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index d559811..780b4a9 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -963,6 +963,8 @@ i386_linux_read_description (struct target_ops *ops) { have_ptrace_getfpxregs = 0; have_ptrace_getregset = 0; + i386_linux_update_regset_section (".reg-xfp", 0); + i386_linux_update_regset_section (".reg-xstate", 0); return tdesc_i386_mmx_linux; } } diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 72aced5..c14eeea 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -567,6 +567,24 @@ static int i386_linux_sc_reg_offset[] = 0 * 4 /* %gs */ }; +/* Update size of core regset section. */ + +void +i386_linux_update_regset_section (const char *name, unsigned int size) +{ + int i; + for (i = 0; i386_linux_regset_sections[i].sect_name != NULL; i++) + if (strcmp (i386_linux_regset_sections[i].sect_name, name) == 0) + { + i386_linux_regset_sections[i].size = size; + break; + } + + if (i386_linux_regset_sections[i].sect_name == NULL) + internal_error (__FILE__, __LINE__, + _("invalid core regset secion %s"), name); +} + /* Get XSAVE extended state xcr0 from core dump. */ uint64_t diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h index 1228681..ba6e11c 100644 --- a/gdb/i386-linux-tdep.h +++ b/gdb/i386-linux-tdep.h @@ -35,6 +35,10 @@ /* Total number of registers for GNU/Linux. */ #define I386_LINUX_NUM_REGS (I386_LINUX_ORIG_EAX_REGNUM + 1) +/* Update size of core regset section. */ +extern void i386_linux_update_regset_section (const char *name, + unsigned int size); + /* Get XSAVE extended state xcr0 from core dump. */ extern uint64_t i386_linux_core_read_xcr0 (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd); diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index e7e001b..4eb029d 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -4174,8 +4174,9 @@ linux_nat_do_thread_registers (bfd *obfd, ptid_t ptid, if (core_regset_p && sect_list != NULL) while (sect_list->sect_name != NULL) { - /* .reg was already handled above. */ - if (strcmp (sect_list->sect_name, ".reg") == 0) + /* Skip empty section and .reg was already handled above. */ + if (sect_list->size == 0 + || strcmp (sect_list->sect_name, ".reg") == 0) { sect_list++; continue; ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 15:50 PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE H.J. Lu @ 2010-04-09 16:00 ` Mark Kettenis 2010-04-09 16:01 ` H.J. Lu 2010-04-09 16:02 ` Joel Brobecker 1 sibling, 1 reply; 12+ messages in thread From: Mark Kettenis @ 2010-04-09 16:00 UTC (permalink / raw) To: hjl.tools; +Cc: gdb-patches > Date: Fri, 9 Apr 2010 08:50:12 -0700 > From: "H.J. Lu" <hongjiu.lu@intel.com> > > Hi, > > This patch fixes gcore by not generating core regset sections which > aren't supported by i386 without SSE. OK to install? Sorry, I think this is the wrong way to fix this. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 16:00 ` Mark Kettenis @ 2010-04-09 16:01 ` H.J. Lu 2010-04-09 19:15 ` Mark Kettenis 0 siblings, 1 reply; 12+ messages in thread From: H.J. Lu @ 2010-04-09 16:01 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb-patches On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> Date: Fri, 9 Apr 2010 08:50:12 -0700 >> From: "H.J. Lu" <hongjiu.lu@intel.com> >> >> Hi, >> >> This patch fixes gcore by not generating core regset sections which >> aren't supported by i386 without SSE. OK to install? > > Sorry, I think this is the wrong way to fix this. > Any suggestions? -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 16:01 ` H.J. Lu @ 2010-04-09 19:15 ` Mark Kettenis 2010-04-09 20:08 ` H.J. Lu 0 siblings, 1 reply; 12+ messages in thread From: Mark Kettenis @ 2010-04-09 19:15 UTC (permalink / raw) To: hjl.tools; +Cc: gdb-patches [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2502 bytes --] > Date: Fri, 9 Apr 2010 09:01:01 -0700 > From: "H.J. Lu" <hjl.tools@gmail.com> > > On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >> Date: Fri, 9 Apr 2010 08:50:12 -0700 > >> From: "H.J. Lu" <hongjiu.lu@intel.com> > >> > >> Hi, > >> > >> This patch fixes gcore by not generating core regset sections which > >> aren't supported by i386 without SSE. OK to install? > > > > Sorry, I think this is the wrong way to fix this. > > > > Any suggestions? Yup. This makes sure we always install a list of register notes that matches the target description. 2010-04-09 Mark Kettenis <kettenis@gnu.org> * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended register note sections. (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): New variables. (i386_linux_init_abi): Install list of supported register note sections that matches the target description. Index: i386-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v retrieving revision 1.74 diff -u -p -r1.74 i386-linux-tdep.c --- i386-linux-tdep.c 8 Apr 2010 22:32:36 -0000 1.74 +++ i386-linux-tdep.c 9 Apr 2010 19:05:25 -0000 @@ -58,7 +58,19 @@ static struct core_regset_section i386_l { { ".reg", 144, "general-purpose" }, { ".reg2", 108, "floating-point" }, + { NULL, 0 } +}; + +static struct core_regset_section i386_linux_sse_regset_sections[] = +{ + { ".reg", 144, "general-purpose" }, { ".reg-xfp", 512, "extended floating-point" }, + { NULL, 0 } +}; + +static struct core_regset_section i386_linux_avx_regset_sections[] = +{ + { ".reg", 144, "general-purpose" }, { ".reg-xstate", I386_XSTATE_MAX_SIZE, "XSAVE extended state" }, { NULL, 0 } }; @@ -862,7 +874,12 @@ i386_linux_init_abi (struct gdbarch_info svr4_fetch_objfile_link_map); /* Install supported register note sections. */ - set_gdbarch_core_regset_sections (gdbarch, i386_linux_regset_sections); + if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.avx")) + set_gdbarch_core_regset_sections (gdbarch, i386_linux_avx_regset_sections); + else if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.sse")) + set_gdbarch_core_regset_sections (gdbarch, i386_linux_sse_regset_sections); + else + set_gdbarch_core_regset_sections (gdbarch, i386_linux_regset_sections); set_gdbarch_core_read_description (gdbarch, i386_linux_core_read_description); ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 19:15 ` Mark Kettenis @ 2010-04-09 20:08 ` H.J. Lu 2010-04-09 20:43 ` H.J. Lu 0 siblings, 1 reply; 12+ messages in thread From: H.J. Lu @ 2010-04-09 20:08 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb-patches On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> Date: Fri, 9 Apr 2010 09:01:01 -0700 >> From: "H.J. Lu" <hjl.tools@gmail.com> >> >> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 >> >> From: "H.J. Lu" <hongjiu.lu@intel.com> >> >> >> >> Hi, >> >> >> >> This patch fixes gcore by not generating core regset sections which >> >> aren't supported by i386 without SSE. OK to install? >> > >> > Sorry, I think this is the wrong way to fix this. >> > >> >> Any suggestions? > > Yup. This makes sure we always install a list of register notes that > matches the target description. > > 2010-04-09 Mark Kettenis <kettenis@gnu.org> > > * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended > register note sections. > (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): > New variables. > (i386_linux_init_abi): Install list of supported register note > sections that matches the target description. > That is nice. We should do the same thing in amd64-linux-tdep.c. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 20:08 ` H.J. Lu @ 2010-04-09 20:43 ` H.J. Lu 2010-04-10 14:49 ` Mark Kettenis 0 siblings, 1 reply; 12+ messages in thread From: H.J. Lu @ 2010-04-09 20:43 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb-patches On Fri, Apr 9, 2010 at 1:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >>> Date: Fri, 9 Apr 2010 09:01:01 -0700 >>> From: "H.J. Lu" <hjl.tools@gmail.com> >>> >>> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >>> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 >>> >> From: "H.J. Lu" <hongjiu.lu@intel.com> >>> >> >>> >> Hi, >>> >> >>> >> This patch fixes gcore by not generating core regset sections which >>> >> aren't supported by i386 without SSE. OK to install? >>> > >>> > Sorry, I think this is the wrong way to fix this. >>> > >>> >>> Any suggestions? >> >> Yup. This makes sure we always install a list of register notes that >> matches the target description. >> >> 2010-04-09 Mark Kettenis <kettenis@gnu.org> >> >> * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended >> register note sections. >> (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): >> New variables. >> (i386_linux_init_abi): Install list of supported register note >> sections that matches the target description. >> > > That is nice. We should do the same thing in amd64-linux-tdep.c. > My second thought. No need to change amd64-linux-tdep.c. We can just add i386_linux_mmx_regset_sections. OK to install? Thanks. H.J. --- 2010-04-09 Mark Kettenis <kettenis@gnu.org> H.J. Lu <hongjiu.lu@intel.com> * i386-linux-tdep.c (i386_linux_mmx_regset_sections): New variable. (i386_linux_init_abi): Call set_gdbarch_core_regset_sections with i386_linux_mmx_regset_sections if SSE isn't available. diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 72aced5..3fc7ef0 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -54,6 +54,13 @@ #include "features/i386/i386-avx-linux.c" /* Supported register note sections. */ +static struct core_regset_section i386_linux_mmx_regset_sections[] = +{ + { ".reg", 144, "general-purpose" }, + { ".reg2", 108, "floating-point" }, + { NULL, 0 } +}; + static struct core_regset_section i386_linux_regset_sections[] = { { ".reg", 144, "general-purpose" }, @@ -862,7 +869,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbar ch *gdbarch) svr4_fetch_objfile_link_map); /* Install supported register note sections. */ - set_gdbarch_core_regset_sections (gdbarch, i386_linux_regset_sections); + if (tdesc_find_feature (tdesc, "org.gnu.gdb.i386.sse")) + set_gdbarch_core_regset_sections (gdbarch, + i386_linux_regset_sections); + else + set_gdbarch_core_regset_sections (gdbarch, + i386_linux_mmx_regset_sections); set_gdbarch_core_read_description (gdbarch, i386_linux_core_read_description); -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 20:43 ` H.J. Lu @ 2010-04-10 14:49 ` Mark Kettenis 2010-04-10 15:46 ` H.J. Lu 0 siblings, 1 reply; 12+ messages in thread From: Mark Kettenis @ 2010-04-10 14:49 UTC (permalink / raw) To: hjl.tools; +Cc: gdb-patches [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1736 bytes --] > Date: Fri, 9 Apr 2010 13:43:06 -0700 > From: "H.J. Lu" <hjl.tools@gmail.com> > > On Fri, Apr 9, 2010 at 1:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > > On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >>> Date: Fri, 9 Apr 2010 09:01:01 -0700 > >>> From: "H.J. Lu" <hjl.tools@gmail.com> > >>> > >>> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >>> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 > >>> >> From: "H.J. Lu" <hongjiu.lu@intel.com> > >>> >> > >>> >> Hi, > >>> >> > >>> >> This patch fixes gcore by not generating core regset sections which > >>> >> aren't supported by i386 without SSE. OK to install? > >>> > > >>> > Sorry, I think this is the wrong way to fix this. > >>> > > >>> > >>> Any suggestions? > >> > >> Yup. This makes sure we always install a list of register notes that > >> matches the target description. > >> > >> 2010-04-09 Mark Kettenis <kettenis@gnu.org> > >> > >> * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended > >> register note sections. > >> (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): > >> New variables. > >> (i386_linux_init_abi): Install list of supported register note > >> sections that matches the target description. > >> > > > > That is nice. We should do the same thing in amd64-linux-tdep.c. > > > > My second thought. No need to change amd64-linux-tdep.c. > We can just add i386_linux_mmx_regset_sections. OK to install? Why should we do it this way? I'm not happy with the _mmx suffix to indicate the lack of SSE registers anyway. That's something I intend to change once things have stabilized a bit. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-10 14:49 ` Mark Kettenis @ 2010-04-10 15:46 ` H.J. Lu 2010-04-13 21:39 ` Mark Kettenis 0 siblings, 1 reply; 12+ messages in thread From: H.J. Lu @ 2010-04-10 15:46 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb-patches On Sat, Apr 10, 2010 at 7:49 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> Date: Fri, 9 Apr 2010 13:43:06 -0700 >> From: "H.J. Lu" <hjl.tools@gmail.com> >> >> On Fri, Apr 9, 2010 at 1:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote: >> > On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> >>> Date: Fri, 9 Apr 2010 09:01:01 -0700 >> >>> From: "H.J. Lu" <hjl.tools@gmail.com> >> >>> >> >>> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: >> >>> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 >> >>> >> From: "H.J. Lu" <hongjiu.lu@intel.com> >> >>> >> >> >>> >> Hi, >> >>> >> >> >>> >> This patch fixes gcore by not generating core regset sections which >> >>> >> aren't supported by i386 without SSE. OK to install? >> >>> > >> >>> > Sorry, I think this is the wrong way to fix this. >> >>> > >> >>> >> >>> Any suggestions? >> >> >> >> Yup. This makes sure we always install a list of register notes that >> >> matches the target description. >> >> >> >> 2010-04-09 Mark Kettenis <kettenis@gnu.org> >> >> >> >> * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended >> >> register note sections. >> >> (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): >> >> New variables. >> >> (i386_linux_init_abi): Install list of supported register note >> >> sections that matches the target description. >> >> >> > >> > That is nice. We should do the same thing in amd64-linux-tdep.c. >> > >> >> My second thought. No need to change amd64-linux-tdep.c. >> We can just add i386_linux_mmx_regset_sections. OK to install? > > Why should we do it this way? > It will be nice for "gcore" to generate all valid note sections so that the older gdb can still exam the core generated by the newer gdb even if the older gdb may not access the new registers it doesn't support. Otherwise, gdb 7.0 can't see any XMM registers in coredump generated by gdb 7.2 on AVX machine even if the upper 128bits of YMM registers are never used. -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-10 15:46 ` H.J. Lu @ 2010-04-13 21:39 ` Mark Kettenis 2010-04-13 21:50 ` Pedro Alves 0 siblings, 1 reply; 12+ messages in thread From: Mark Kettenis @ 2010-04-13 21:39 UTC (permalink / raw) To: hjl.tools; +Cc: gdb-patches [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 2526 bytes --] > Date: Sat, 10 Apr 2010 08:46:04 -0700 > From: "H.J. Lu" <hjl.tools@gmail.com> > > On Sat, Apr 10, 2010 at 7:49 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >> Date: Fri, 9 Apr 2010 13:43:06 -0700 > >> From: "H.J. Lu" <hjl.tools@gmail.com> > >> > >> On Fri, Apr 9, 2010 at 1:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote: > >> > On Fri, Apr 9, 2010 at 12:15 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >> >>> Date: Fri, 9 Apr 2010 09:01:01 -0700 > >> >>> From: "H.J. Lu" <hjl.tools@gmail.com> > >> >>> > >> >>> On Fri, Apr 9, 2010 at 8:59 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote: > >> >>> >> Date: Fri, 9 Apr 2010 08:50:12 -0700 > >> >>> >> From: "H.J. Lu" <hongjiu.lu@intel.com> > >> >>> >> > >> >>> >> Hi, > >> >>> >> > >> >>> >> This patch fixes gcore by not generating core regset sections which > >> >>> >> aren't supported by i386 without SSE. OK to install? > >> >>> > > >> >>> > Sorry, I think this is the wrong way to fix this. > >> >>> > > >> >>> > >> >>> Any suggestions? > >> >> > >> >> Yup. This makes sure we always install a list of register notes that > >> >> matches the target description. > >> >> > >> >> 2010-04-09 Mark Kettenis <kettenis@gnu.org> > >> >> > >> >> * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended > >> >> register note sections. > >> >> (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): > >> >> New variables. > >> >> (i386_linux_init_abi): Install list of supported register note > >> >> sections that matches the target description. > >> >> > >> > > >> > That is nice. We should do the same thing in amd64-linux-tdep.c. > >> > > >> > >> My second thought. No need to change amd64-linux-tdep.c. > >> We can just add i386_linux_mmx_regset_sections. OK to install? > > > > Why should we do it this way? > > > > It will be nice for "gcore" to generate all valid note sections > so that the older gdb can still exam the core generated by > the newer gdb even if the older gdb may not access the > new registers it doesn't support. Otherwise, gdb 7.0 > can't see any XMM registers in coredump generated > by gdb 7.2 on AVX machine even if the upper 128bits > of YMM registers are never used. Thought about this for a bit, but I think it is better not to include those registers at all than to generate core dumps where half the register appears to be "lost". So I committed my origional diff, and I'll change amd64-linux-tdep.c to match the i386 behaviour. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-13 21:39 ` Mark Kettenis @ 2010-04-13 21:50 ` Pedro Alves 0 siblings, 0 replies; 12+ messages in thread From: Pedro Alves @ 2010-04-13 21:50 UTC (permalink / raw) To: gdb-patches; +Cc: Mark Kettenis, hjl.tools On Tuesday 13 April 2010 22:39:06, Mark Kettenis wrote: > Thought about this for a bit, but I think it is better not to include > those registers at all than to generate core dumps where half the > register appears to be "lost". FWIW, I also think that's the correct choice. -- Pedro Alves ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 15:50 PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE H.J. Lu 2010-04-09 16:00 ` Mark Kettenis @ 2010-04-09 16:02 ` Joel Brobecker 2010-04-09 16:05 ` H.J. Lu 1 sibling, 1 reply; 12+ messages in thread From: Joel Brobecker @ 2010-04-09 16:02 UTC (permalink / raw) To: H.J. Lu; +Cc: GDB Mark already answered, but I noticed something that was perhaps worth a suggestion: > + if (i386_linux_regset_sections[i].sect_name == NULL) > + internal_error (__FILE__, __LINE__, > + _("invalid core regset secion %s"), name); In this sort of situation (something that should never happen unless there is a programming error in GDB), you might prefer the use of gdb_assert. -- Joel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE 2010-04-09 16:02 ` Joel Brobecker @ 2010-04-09 16:05 ` H.J. Lu 0 siblings, 0 replies; 12+ messages in thread From: H.J. Lu @ 2010-04-09 16:05 UTC (permalink / raw) To: Joel Brobecker; +Cc: H.J. Lu, GDB On Fri, Apr 9, 2010 at 9:02 AM, Joel Brobecker <brobecker@adacore.com> wrote: > Mark already answered, but I noticed something that was perhaps worth > a suggestion: > >> + if (i386_linux_regset_sections[i].sect_name == NULL) >> + internal_error (__FILE__, __LINE__, >> + _("invalid core regset secion %s"), name); > > In this sort of situation (something that should never happen unless > there is a programming error in GDB), you might prefer the use of > gdb_assert. > I made the change. I am waiting for suggestions before submitting a new patch. Thanks. -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-04-13 21:50 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-04-09 15:50 PATCH: PR corefiles/11481: gcore doesn't work on i386 without SSE H.J. Lu 2010-04-09 16:00 ` Mark Kettenis 2010-04-09 16:01 ` H.J. Lu 2010-04-09 19:15 ` Mark Kettenis 2010-04-09 20:08 ` H.J. Lu 2010-04-09 20:43 ` H.J. Lu 2010-04-10 14:49 ` Mark Kettenis 2010-04-10 15:46 ` H.J. Lu 2010-04-13 21:39 ` Mark Kettenis 2010-04-13 21:50 ` Pedro Alves 2010-04-09 16:02 ` Joel Brobecker 2010-04-09 16:05 ` H.J. Lu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox