diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 36cb4c9e7e9..8d3a37130f7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-09  Vasili Burdo <vasili.burdo@gmail.com>
+
+    PR tui/25347
+	* tui/tui-disasm.c (tui_disassemble,tui_disasm_window::set_content): Hide
+	the function names in TUI disassembly view. Instead, display them like
+	assembly language labels.
+
 2021-06-08  Lancelot Six  <lsix@lancelotsix.com>
 
 	* python/lib/gdb/FrameDecorator.py (FrameDecorator): Use 'is None'
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 163552aede4..186ae87f723 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -27,6 +27,7 @@
 #include "value.h"
 #include "source.h"
 #include "disasm.h"
+#include "valprint.h"
 #include "tui/tui.h"
 #include "tui/tui-command.h"
 #include "tui/tui-data.h"
@@ -50,6 +51,7 @@ struct tui_asm_line
   std::string addr_string;
   size_t addr_size;
   std::string insn;
+  std::string func_string;
 };
 
 /* Helper function to find the number of characters in STR, skipping
@@ -92,6 +94,9 @@ len_without_escapes (const std::string &str)
    label into the value pointed to by ADDR_SIZE, and set the addr_size
    field on each item in ASM_LINES, otherwise the addr_size fields within
    ASM_LINES are undefined.
+   FOR_UI boolean flag shows the purpose this function is called for. TRUE
+   means we're going to show ASM_LINES on screen, FALSE means ASM_LINES are
+   used to figure out current scroll position or any other purpose.
 
    It is worth noting that ASM_LINES might not have COUNT entries when this
    function returns.  If the disassembly is truncated for some other
@@ -101,7 +106,8 @@ static CORE_ADDR
 tui_disassemble (struct gdbarch *gdbarch,
 		 std::vector<tui_asm_line> &asm_lines,
 		 CORE_ADDR pc, int count,
-		 size_t *addr_size = nullptr)
+		 size_t *addr_size = nullptr,
+		 bool for_ui = false)
 {
   bool term_out = source_styling && gdb_stdout->can_emit_style_escape ();
   string_file gdb_dis_out (term_out);
@@ -110,7 +116,7 @@ tui_disassemble (struct gdbarch *gdbarch,
   asm_lines.clear ();
 
   /* Now construct each line.  */
-  for (int i = 0; i < count; ++i)
+  while (asm_lines.size () < count)
     {
       tui_asm_line tal;
       CORE_ADDR orig_pc = pc;
@@ -135,8 +141,52 @@ tui_disassemble (struct gdbarch *gdbarch,
 
       /* And capture the address the instruction is at.  */
       tal.addr = orig_pc;
-      print_address (gdbarch, orig_pc, &gdb_dis_out);
-      tal.addr_string = std::move (gdb_dis_out.string ());
+      if (for_ui)
+        { /* If we're rendering for UI... */
+          std::string name, filename;
+          int unmapped = 0, offset = 0, line = 0;
+
+          if (0 == build_address_symbolic (gdbarch, orig_pc, asm_demangle,
+                false, &name, &offset, &filename, &line, &unmapped))
+            {
+              if (0 == offset || asm_lines.empty ())
+                {/* "offset == 0" means function start,
+                    "asm_lines.empty ()" means top line of output.
+                    For these cases, insert "function header" on top of
+                    "real" disassembly line. */
+                  tui_asm_line tal2 = tal;
+                  fputs_styled (name.c_str (), function_name_style.style (),
+                                &gdb_dis_out);
+                  fputs_filtered (":", &gdb_dis_out);
+                  tal2.addr_string = std::move (gdb_dis_out.string ());
+                  tal2.addr_size = 0;
+                  tal2.insn.clear ();
+                  tal2.func_string = name;
+                  gdb_dis_out.clear ();
+
+                  asm_lines.push_back (std::move (tal2));
+                }
+
+              fputs_styled (paddress (gdbarch, orig_pc),
+                            address_style.style (), &gdb_dis_out);
+              fputs_filtered (" <", &gdb_dis_out);
+              if (unmapped)
+                fputs_filtered ("*", &gdb_dis_out);
+              fprintf_styled (&gdb_dis_out, address_style.style (),
+                              "%+d", offset);
+              if (unmapped)
+                fputs_filtered ("*", &gdb_dis_out);
+              fputs_filtered (">", &gdb_dis_out);
+              tal.addr_string = std::move (gdb_dis_out.string ());
+              tal.func_string = std::move (name);
+            }
+        }
+      else
+        { /* If we're rendering for some other purpose than UI...
+             Fall back to legacy disassembly line style. */
+          print_address (gdbarch, orig_pc, &gdb_dis_out);
+          tal.addr_string = std::move (gdb_dis_out.string ());
+        }
       gdb_dis_out.clear ();
 
       if (addr_size != nullptr)
@@ -342,11 +392,14 @@ tui_disasm_window::set_contents (struct gdbarch *arch,
   /* Get temporary table that will hold all strings (addr & insn).  */
   std::vector<tui_asm_line> asm_lines;
   size_t addr_size = 0;
-  tui_disassemble (m_gdbarch, asm_lines, pc, max_lines, &addr_size);
+  tui_disassemble (m_gdbarch, asm_lines, pc, max_lines, &addr_size, true);
 
   /* Align instructions to the same column.  */
   insn_pos = (1 + (addr_size / tab_len)) * tab_len;
 
+  /* Reset window title. */
+  this->title.clear ();
+
   /* Now construct each line.  */
   m_content.resize (max_lines);
   m_max_length = -1;
@@ -378,7 +431,12 @@ tui_disasm_window::set_contents (struct gdbarch *arch,
 
       src->line_or_addr.loa = LOA_ADDRESS;
       src->line_or_addr.u.addr = addr;
-      src->is_exec_point = (addr == cur_pc && line.size () > 0);
+      src->is_exec_point = (addr == cur_pc && line.size () > 0
+                            && !asm_lines[i].insn.empty ());
+
+      /* Set window title to function currently being executed. */
+      if (src->is_exec_point)
+        this->title = asm_lines[i].func_string;
     }
   return true;
 }
