Dave,
On Wed, Mar 13, 2013 at 11:26 PM, Dave Anderson <anderson(a)redhat.com> wrote:
----- Original Message -----
> I see...
> How about below patch, I add the checking for return value of
> block_for_pc_sect, is it better now?
Sorry, I can't even apply this patch:
# patch -p1 < textname.patch
patching file defs.h
Hunk #1 succeeded at 3721 with fuzz 2 (offset 36 lines).
patching file gdb-7.3.1.patch
patch: **** malformed patch at line 17: gdb-7.3.1/gdb/psymtab.c
#
And if I remove the gdb-7.3.1.patch section, it still fails:
# patch -p1 < textname.patch2
patching file defs.h
Hunk #1 succeeded at 3721 with fuzz 2 (offset 36 lines).
patching file gdb_interface.c
Hunk #1 FAILED at 590.
1 out of 1 hunk FAILED -- saving rejects to file gdb_interface.c.rej
patching file symbols.c
Hunk #1 FAILED at 6660.
Hunk #2 FAILED at 6693.
Hunk #3 FAILED at 6705.
3 out of 3 hunks FAILED -- saving rejects to file symbols.c.rej
$
The patch seems to be missing tabs or something?
Anyway, when posting patches, can you please make them as attachments
to your email instead of inline?
Also, my original complaint was that it changes the behavior of the
"whatis" command if you enter a module text symbol without loading the
module's debuginfo data, because it quietly fails without displaying
anything. And that is because you've added the arg_to_datatype() call
here:
static void
whatis_variable(struct syment *sp)
{
+ struct datatype_member datatype_member, *dm;
+ struct gnu_request *req;
+ int ret;
char *p1;
char buf[BUFSIZE];
+ dm = &datatype_member;
+ strcpy(buf, sp->name);
+ if (!arg_to_datatype(buf, dm, RETURN_ON_ERROR|DATATYPE_QUERY))
+ return FALSE;
+
If you just return FALSE above, then nothing get printed at all, and
you don't reach the "error(FATAL, ..." message.
I see what you are concerning about...
Attach the new format patch, which would just error out when it detect
datatype failed.
Thanks,
Lei