From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [obv] Reindent code (resolve_dynamic_type_internal)
Date: Mon, 24 Nov 2014 17:06:00 -0000 [thread overview]
Message-ID: <20141124170638.GA22454@host2.jankratochvil.net> (raw)
[-- Attachment #0: Type: message/rfc822, Size: 2469 bytes --]
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH] Reindent code (resolve_dynamic_type_internal).
Date: Mon, 24 Nov 2014 18:05:04 +0100
gdb/ChangeLog
2014-11-24 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdbtypes.c (resolve_dynamic_type_internal): Reindent the code.
---
gdb/ChangeLog | 4 ++++
gdb/gdbtypes.c | 40 ++++++++++++++++++++--------------------
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 506dc61..7726bd2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdbtypes.c (resolve_dynamic_type_internal): Reindent the code.
+
2014-11-24 Samuel Thibault <samuel.thibault@ens-lyon.org>
Pushed by Joel Brobecker <brobecker@adacore.com>
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 976d56f..61d259d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1877,31 +1877,31 @@ resolve_dynamic_type_internal (struct type *type, CORE_ADDR addr,
switch (TYPE_CODE (type))
{
- case TYPE_CODE_TYPEDEF:
+ case TYPE_CODE_TYPEDEF:
+ resolved_type = copy_type (type);
+ TYPE_TARGET_TYPE (resolved_type)
+ = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr,
+ top_level);
+ break;
+
+ case TYPE_CODE_REF:
+ {
+ CORE_ADDR target_addr = read_memory_typed_address (addr, type);
+
resolved_type = copy_type (type);
TYPE_TARGET_TYPE (resolved_type)
- = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type), addr,
- top_level);
+ = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type),
+ target_addr, top_level);
break;
+ }
- case TYPE_CODE_REF:
- {
- CORE_ADDR target_addr = read_memory_typed_address (addr, type);
-
- resolved_type = copy_type (type);
- TYPE_TARGET_TYPE (resolved_type)
- = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (type),
- target_addr, top_level);
- break;
- }
-
- case TYPE_CODE_ARRAY:
- resolved_type = resolve_dynamic_array (type, addr);
- break;
+ case TYPE_CODE_ARRAY:
+ resolved_type = resolve_dynamic_array (type, addr);
+ break;
- case TYPE_CODE_RANGE:
- resolved_type = resolve_dynamic_range (type, addr);
- break;
+ case TYPE_CODE_RANGE:
+ resolved_type = resolve_dynamic_range (type, addr);
+ break;
case TYPE_CODE_UNION:
resolved_type = resolve_dynamic_union (type, addr);
--
2.1.0
reply other threads:[~2014-11-24 17:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20141124170638.GA22454@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).